Hey, for some reason when I try and compile and build my code, it's giving me errors...
NOTES: Spacing is odd only when I post the code on the message board
Code:
#include <iostream>
using std::cin;
using std::cout;
using std::endl;
int main()
{
cout << "The knight's tour requires a knight to touch every space on the chessboard." << endl;
cout << "Here is the solution to the knight's tour, each number represents a move." << endl;
cout << " -------------------------------------------------------------- " << endl;
cout << "|1 |24 |55 |36 |11 |22 |53 |34 |" << endl;
cout << " -------------------------------------------------------------- " << endl;
cout << "|56 |37 |12 |23 |54 |35 |10 |21 |" << endl;
cout << " -------------------------------------------------------------- " << endl;
cout << "|13 |2 |25 |64 |41 |60 |33 |52 |" << endl;
cout << " -------------------------------------------------------------- " << endl;
cout << "|26 |57 |38 |61 |44 |63 |20 |9 |" << endl;
cout << " -------------------------------------------------------------- " << endl;
cout << "|3 |14 |45 |42 |59 |40 |51 |32 |" << endl;
cout << " -------------------------------------------------------------- " << endl;
cout << "|40 |27 |58 |39 |62 |43 |8 |19 |" << endl;
cout << " -------------------------------------------------------------- " << endl;
cout << "|15 |4 |29 |48 |17 |6 |31 |50 |" << endl;
cout << " -------------------------------------------------------------- " << endl;
cout << "|28 |47 |16 |5 |30 |49 |18 |7 |" << endl;
cout << " -------------------------------------------------------------- " << endl;
cout << "The moves create a semi-symmetrical pattern around the board. << endl;
cout << "The tour is completed with only four trips around the board. << endl;
return 0;
}
here are my errors
Code:
knightstour.cpp(32) : error C2001: newline in constant
knightstour.cpp(33) : error C2146: syntax error : missing ';' before identifier 'cout'
knightstour.cpp(33) : error C2001: newline in constant
knightstour.cpp(35) : error C2143: syntax error : missing ';' before 'return'
Error executing cl.exe.