Weird Error I Don't Understand (Solved)

i don't understand this error
C:\Dev-Cpp\Makefile.win [Build Error] [1stprojfile.o] Error 1

can anybody explain what that is? sorry for being a noob
Last edited on
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.
im emberassed it's so simple but i'm only 12 and not that smart

1
2
3
4
5
6
#include <stdio.h>
main()
{
 printf("Hello World!\n");
 system("pause");
}
Last edited on
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
Last edited on
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

using namespace 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 =(
Last edited on
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

using namespace std; // cout is in std namesapce

int main() {
 cout << "Hello World" << endl; // endl = end line
 // cout = Console Output
 system("pause");
 return 0;
}
Last edited on
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.

Good luck learning C++
thank you and thats cool
Have you looked at the C++ tutorial on this website? It's under documentation.
Crud, you got a one year headstart on me, Hippie. Started a month ago.
Edit: Removed age.
Last edited on
well my birthday is in like 2 weeks exactly =P

and thank you Mike it's a pretty good guide
Topic archived. No new replies allowed.