With the build process the errors are crap. You will need to copy and paste the contents of your "Console" tab for us to have any idea what has gone wrong.
There isn't much that could be wrong. it's a guess but main is usually defined as returning an int so I'd try that
1 2 3 4 5 6 7 8
#include <stdio.h>
int main()
{
printf("Hello World!\n");
system("pause");
return 0; //return an int. can be anything but zero is usually used to
// indicate a successful completion
}
BTW don't be embarrassed, you have to start somewhere and there's nothing wrong with being 12, in fact I'm quite jealous
Dang, Wish I was learning C++ when I was 12 =\ I started when I was like 19. I'd be a complete guru by now :D
I will note though Hippie, printf() is typically a C, not C++ function. You should learn to study the "IOStreams" (Input/Output Streams).
e.g.
1 2 3 4 5 6 7 8 9
#include <iostream> // Note C++ don't usually have a .h
usingnamespace std; // cout is in std namesapce
int main() {
cout << "Hello World" << endl; // endl = end line
// cout = Console Output
return 0;
}
thanks guys =D
and im curious do you know a good link for a [tut] for "IOStreams" or should i just google it because i'm learning everything right off the internet for free lol and i tried doing what you said and they didn't work =(
i worked on it and i solved the problem with a combination of your guy's codes Zaita your's worked great but i totally forgot about system("pause")
1 2 3 4 5 6 7 8 9 10
#include <iostream> // Note C++ don't usually have a .h
usingnamespace std; // cout is in std namesapce
int main() {
cout << "Hello World" << endl; // endl = end line
// cout = Console Output
system("pause");
return 0;
}
Ahhh no worries :) My code never has a system("pause") because my C++ IDE has an integrated console (Eclipse). So I have no need for them when testing code.