| View previous topic :: View next topic |
| Author |
Message |
dEEznutz Grandmaster Cheater
Reputation: 0
Joined: 29 Nov 2007 Posts: 514
|
Posted: Tue Oct 07, 2008 5:38 pm Post subject: What am I doing wrong....? |
|
|
Here's a source was trying to quiz myself from the stuff I've read learning c++. I know its noob but I could care less.. I'm just trying to figure out what the hell I'm missing.. Yes, I've looked over it, and if its an obvious problem then it's safe for you to say I'm a retard.
| Code: | #include "stdafx.h"
#include <iostream>
using namespace std;
int main ()
int a,b,c;
{
cout << " I fail at this game.";
a=5;
b=5;
c=a*b;
cout<<c<<end;
cin.get();
return 0;
} |
Problem - error C2447: '{' : missing function header (old-style formal list?) _________________
Learning C++ |
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Tue Oct 07, 2008 5:45 pm Post subject: |
|
|
int main()
{
int a, b, c;
...
} _________________
|
|
| Back to top |
|
 |
dEEznutz Grandmaster Cheater
Reputation: 0
Joined: 29 Nov 2007 Posts: 514
|
Posted: Tue Oct 07, 2008 5:50 pm Post subject: |
|
|
| lurc wrote: | int main()
{
int a, b, c;
...
} |
...Swear to god I had this before and I got a pile of even bigger shit.
Now, it's giving me "error C2065: 'end' : undeclared identifier" and then when I put int a,b,c,end; it gave me a "Run-Time Check Failure #3 - The variable 'end' is being used without being initialized." Any idea whats wrong with this?
EDIT - Lol, I'm so dumb.. Forgot to add in the l in endl... Anyways, thanks lurc. _________________
Learning C++ |
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Tue Oct 07, 2008 5:54 pm Post subject: |
|
|
| you're missing the L in endl; |
|
| Back to top |
|
 |
dEEznutz Grandmaster Cheater
Reputation: 0
Joined: 29 Nov 2007 Posts: 514
|
Posted: Tue Oct 07, 2008 5:58 pm Post subject: |
|
|
Yeah, don't know how I forgot that lol. Anyways, you can close this topic now, thanks a lot. _________________
Learning C++ |
|
| Back to top |
|
 |
|