Few newb questions

Posts 15 of 5 · Page 1 of 1
Few newb questions
Ok, so im going to learn c++, and i have a COmpletle refrence guide to c++, roughly 1100 pages long. Its a real book, made of paper. I also sense i will be flammed.

1)Now this book is mainly for c++ console apps, but after reading the first 30 pages, it seems simillar to vb, c# in things like float, double, long double, int, void e.t.c. So if i learnt all of it, would it make much use in programs like .dlls, or .exes?

2) There is a table of how many bits something takes like int is 16 or 32 bits in size, float is 32 bit, and double is 62 bit. In things like say a spammer, where int, float or double, meaning single number (1,2,3) or 6 place precision or 10 place precision, what does it mean by size in bits? Is this like bits used in ram? If so, why do spammers really need the 10 didgets? when we can half the usuage and still have more then half the didgets, i mean who even needs 10 didgets when 6 is enough?

3) Am i doing the right thing?

If i have any further questions i will but them in this thread,
Thanks in advance
Merry christmas
1. Nope not all u learn will help u make dlls/exes which are applicable to your needs
and I highly doubt u will finish reading it
2. No idea what u r talking about

3.follow your instinct
MSVC++ on a 32 bit OS:
char = 1 byte
bool = 1 byte
short(or short int) = 2 bytes
int = 4 bytes
enum = 4 bytes
long(or long int) = 4 bytes
float = 4 bytes
double = 8 bytes
long double = 10 bytes

You can use sizeof(type) to get its size(e.g. sizeof(int) will return 4)
Quote Originally Posted by Hell_Demon View Post
MSVC++ on a 32 bit OS:
char = 1 byte
bool = 1 byte
short(or short int) = 2 bytes
int = 4 bytes
enum = 4 bytes
long(or long int) = 4 bytes
float = 4 bytes
double = 8 bytes
long double = 10 bytes

You can use sizeof(type) to get its size(e.g. sizeof(int) will return 4)
FYI! the sizeof(type) function can be found in the climits header file, most commonly included as such,[php]#include <climits>[/php]

This personally confuses the shit out of me, but I guess it's just archetecture specific variables, I dunno.

ALSO! to break it down a bit more, if you didn't know, 1 byte = 8 bits, I.e. 4 bytes would be 32bit, and 8 bytes would be 64 bit.
hey guess what you have been flamed
Posts 15 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?