View Single Post
  #2 (permalink)  
Old June 17th, 2008, 02:57 AM
Jiffyman Jiffyman is offline
Registered User
 
Join Date: Jun 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok I got the first exercise to work by removing the numbers. Now I got another problem compiling this source.

Source Code:

#include <iostream.h>
int main()
{
int x = 5;
int y = 7;
cout "\n";
cout << x + y << " " << x * y;
cout "\n";
return }

Error:

geoff@Geoffs-Ubuntu-X64:~/Documents/Learn-C++/Source/Learn-C++-in-21-Days$ g++ -Wno-deprecated Guess.cpp
Guess.cpp: In function ‘int main()’:
Guess.cpp:6: error: expected `;' before string constant
Guess.cpp:8: error: expected `;' before string constant

I have no idea what the program is supposed to do. The idea of the exercise is to take a guess at it.
Reply With Quote