[C++] Complete beginner at C++, question about overflows

Hello everyone, thanks for clicking my message and taking the time to read it, let me introduce myself.

Ever since middle school I dreamed about becoming a computer programmer and was sure that I was going to follow an education in programming.
The year I applied for a school that had C++ in their lessons they changed their program and got rid of C++ because they taught it to be to difficult.

Learning programming languages is now something you only learn when trying to earn a degree in higher education (I'm Dutch, so our schoolsystem differs a lot compared to US standards or anything.)

I followed a degree in a lower educational system and learned some Visual Basic for Applications which didn't really made my enthousiasm for programming come up again, but ok.
Since I "graduated" and earned something you could call a degree in IT I started to notice that I'm probably not a programmer, because I lack the way of thinking a programmer needs.

I'm now unemployed for almost 2 and a half months now and I decided to pick my C++ self study book from my shelf again.
When I was 14 or younger my dad bought it for me because I was interested in programming, but the book was way to difficult for me back then.

I've followed some online tutorials too, but my technical English isn't that well, so understanding some of the parts of a tutorial can be difficult (that's why I like my Dutch book :P)

So I decided to start following the lessons in the book, which proved to be somewhat of a problem, because the book is outdated, the start of a program begins with a deprecated command (that was what my compiler (Code::blocks) said.)

I'm now down to variables and what types you have, what limitations each variable has and so on.

What baffles me is that giving an "int" variable a value of over 32767 it still displays 60000 (the sum was 200 multiplied by 300)
Has there been an improvement in C++ ever since 1998 (the book is dated around 1998) or is this a compiler-dependent issue?

Sorry for the whole story beforehand...

Thanks again for reading!
That's outdated, even for 1998.

"int" nowadays is typically 32 bits wide, not 16. It hasn't been 16 bits wide in PC programming for quite a long time (Win 3.1? DOS? Ancient, ancient, ancient)

But note that int is not guaranteed to be 32 bits wide. It's only guaranteed to be at least 16 bits wide.

So it does depend on the system/compiler.
Topic archived. No new replies allowed.