How do I learn C with Eclipse? [message #902106] |
Wed, 15 August 2012 21:06 |
Cabhan Listis Messages: 1 Registered: August 2012 Location: Maine, United States |
Junior Member |
|
|
I bought a book, Absolute Beginner's Guide to C, and got Eclipse up and running. But some of the code between that book and the Juno release of Eclipse seems a little off. My book is copyright 1994, so I was wondering if C has changed since then?
I'm just learning how to program, and tell me if I'm off, but it seems like there may be a few variations between IDEs or C?
For example, the help file, "Creating your C++ file" from "C/C++ Development User Guide > Getting Started" gives the code:
#include <iostream>
using namespace std;
int main () {
// Say Hello five times
for (int index = 0; index < 5; ++index)
cout << "HelloWorld!" << endl;
char input = 'i';
cout << "To exit, press 'm'" << endl;
while(input != 'm') {
cin >> input;
cout << "You just entered " << input
<< " you need to enter m to exit." << endl;
}
exit(0);
}
And it took me a few weeks to figure out that "exit" was wrong. It only worked when I changed it to "return".
Is there a C primer/guide I can start with because some of the code from my book works and some do not.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05802 seconds