I have always been into the tech side of things...networks / pc's etc.
but used to program basic on my cbm64 when i was like 10.
felt like i was lacking on the creative side of computing. so i picked up
C++ for dummies 5th edition...is it any good as a starting point? (Maybe you guys in this fine community can send me in a better direction)
anyways...
i copied a tempreture program from the book and pasted it into my compiler.
im using dev+ 4.9.9.2 but all iget is errors.
when the author said it should run...he then creates an error after compiling the program to show you...but i get an error immediatly.
I have a C++ book similar to the one you've bought and I've come to realize that a lot of the syntax the author uses is usually old and outdated or is missing key components.
For instance, here's some code from my book:
1 2 3 4 5 6 7 8 9 10
#include <iostream>
#include <stdlib.h>
int main (int argc, char *argv[]) {
cout<< "Hello world" <<endl;
system ("PAUSE");
return 0;
}
When it's supposed to be:
1 2 3 4 5 6 7 8 9 10 11 12
#include <iostream>
#include <cstdlib>
usingnamespace std;
int main (int argc, char *argv[]) {
cout<< "Hello world" <<endl;
system ("PAUSE");
return 0;
}
You may want to look up some more recent C++ programming tutorials and use a mixture of your book and the online help.
Try Code::Blocks. Even when it was supported, Dev-C++ was a little too simple and lacked features that make programs like Visual Studio handy, such as Intellisense. Code::Blocks doesn't have Intellisense, but it's great for someone who can't afford Visual Studio (or who isn't a student and can't get it for free, :P)
@kyon What are you pulling there? (haha with the \m/ I imagined a drowning dude with an m head)
on another note: Janian, is there a particular reason you aren't doing this:
1 2 3 4 5 6
#include <iostream>
usingnamespace std;
int main(){
cout <<"My Output To The Console\n"; // <- notice the first << and for that matter the \n
cin.get(); // or something (I don't like the system method)
}