I am trying to impement the simplest of programs,
#include <iostream>
using namespace std;
int x = 1;
cout >> "hello world";
but I get,
C++_Prefix-dwhjsqjyhnjzkbbxypqkxsqhiyir/Learn C++_Prefix.pch" -c "/Users/mark_g_miller/Learn C++/Tutorial1.cpp" -o "/Users/mark_g_miller/Learn C++/build/Learn C++.build/Release/Learn C++.build/Objects-normal/i386/Tutorial1.o"
/Users/mark_g_miller/Learn C++/Tutorial1.h:15: error: expected constructor, destructor, or type conversion before '<<' token
/Users/mark_g_miller/Learn C++/Tutorial1.h:15: error: expected constructor, destructor, or type conversion before '<<' token
and know that it relates to the statement as when I remove it my debug runs through the code. I apologise for the simplicity but have no idea how to solve.
Any answers - mmiler039@gmail.com
#include <iostream>
using namespace std;
int x = 1;
cout >> "hello world";
but I get,
C++_Prefix-dwhjsqjyhnjzkbbxypqkxsqhiyir/Learn C++_Prefix.pch" -c "/Users/mark_g_miller/Learn C++/Tutorial1.cpp" -o "/Users/mark_g_miller/Learn C++/build/Learn C++.build/Release/Learn C++.build/Objects-normal/i386/Tutorial1.o"
/Users/mark_g_miller/Learn C++/Tutorial1.h:15: error: expected constructor, destructor, or type conversion before '<<' token
/Users/mark_g_miller/Learn C++/Tutorial1.h:15: error: expected constructor, destructor, or type conversion before '<<' token
and know that it relates to the statement as when I remove it my debug runs through the code. I apologise for the simplicity but have no idea how to solve.
Any answers - mmiler039@gmail.com