|
|
|
|
void Stringer::setHelloWorld(string inVal){
#include <string.h>
should be #include <string>
using namespace std;
in one of your files, use the std::
prefix on string
and cout
in that file.
|
|
|
|
1>------ Build started: Project: Hw1, Configuration: Debug Win32 ------ 1> hw1.cpp 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.h(13): error C2146: syntax error : missing ';' before identifier 'getHelloWorld' 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.h(13): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.h(13): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.h(13): warning C4183: 'getHelloWorld': missing return type; assumed to be a member function returning 'int' 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.h(14): error C2061: syntax error : identifier 'string' 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.h(17): error C2146: syntax error : missing ';' before identifier 'helloWorld' 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.h(17): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.h(17): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(14): error C2533: 'Stringer::{ctor}' : constructors not allowed a return type 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(21): error C2065: 'helloWorld' : undeclared identifier 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(25): error C2039: 'setHelloWorld' : is not a member of 'Stringer' 1> c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.h(8) : see declaration of 'Stringer' 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(25): error C2065: 'string' : undeclared identifier 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(25): error C2146: syntax error : missing ')' before identifier 'inVal' 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(25): error C2182: 'setHelloWorld' : illegal use of type 'void' 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(25): error C2059: syntax error : ')' 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(25): error C2143: syntax error : missing ';' before '{' 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(25): error C2447: '{' : missing function header (old-style formal list?) 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(36): error C2143: syntax error : missing ';' before 'Stringer::getHelloWorld' 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(36): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(36): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(43): error C2065: 'helloWorld' : undeclared identifier 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(51): error C2061: syntax error : identifier 'chard' 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(53): error C2264: 'Stringer::Stringer' : error in function definition or declaration; function not called 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(54): error C2872: 'string' : ambiguous symbol 1> could be 'c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(36) : int string' 1> or 'c:\program files (x86)\microsoft visual studio 10.0\vc\include\xstring(2063) : std::string' 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(54): error C2872: 'string' : ambiguous symbol 1> could be 'c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(36) : int string' 1> or 'c:\program files (x86)\microsoft visual studio 10.0\vc\include\xstring(2063) : std::string' 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(54): error C2146: syntax error : missing ';' before identifier 'writeOut' 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(54): error C2065: 'writeOut' : undeclared identifier 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(56): error C2039: 'setHelloWorld' : is not a member of 'Stringer' 1> c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.h(8) : see declaration of 'Stringer' 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(58): error C2065: 'writeOut' : undeclared identifier 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(60): error C2065: 'cout' : undeclared identifier 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(61): error C2065: 'cout' : undeclared identifier 1>c:\users\j goodies\documents\school\cis 269\hw1\hw1\hw1.cpp(61): error C2065: 'writeOut' : undeclared identifier ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== |
void Stringer::setHelloWorld(<error-type> inVal) Error: decleration is incompatible with "void Stringer::setHelloWorld(<error-type> inVal)" (declared at line 24) |
Error: identifier "cout" is undefined |
|
|
|
|
|
|
|
|
|
|
1>------ Build started: Project: Hw1, Configuration: Debug Win32 ------ 1> hw1.cpp 1>hw1.obj : error LNK2019: unresolved external symbol "public: __thiscall Stringer::~Stringer(void)" (??1Stringer@@QAE@XZ) referenced in function _main 1>C:\Users\J Goodies\Documents\School\CIS 269\Hw1\Debug\Hw1.exe : fatal error LNK1120: 1 unresolved externals ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== |
|
|
|
|
|
|
|
|
|
|