[ask] compile code C++ malah error d...
[ask]
ini kenapa ya compile code C++ malah error di terminalnya... test.cpp:6:9: warning: missing terminating " character [enabled by default] test.cpp:6:2: error: missing terminating " character test.cpp:4:1: error: expected initializer before '}' token test.cpp:4:1: error: expected declaration before '}' token apa codenya yg salah??? | |||
ini code C++nya
#include<iostream> using namespace std; int main () } cout<<"hello world! \n"; system("pause); return 0; } | |||
coba ganti jadi : #include<iostream> using namespace std; int main () { cout<<"hello world! \n"; system("pause); return 0; }
| |||
itu yg depan kyknya kebalik... Untuk mulai pake tanda -> {
| |||
test.cpp:1:1: error: stray '\342' in program
test.cpp:1:1: error: stray '\200' in program test.cpp:1:1: error: stray '\252' in program test.cpp:1:1: error: stray '#' in program test.cpp:1:1: error: stray '\342' in program test.cpp:1:1: error: stray '\200' in program test.cpp:1:1: error: stray '\216' in program test.cpp:1:1: error: stray '\342' in program test.cpp:1:1: error: stray '\200' in program test.cpp:1:1: error: stray '\254' in program test.cpp:4:35: warning: missing terminating " character [enabled by default] test.cpp:4:1: error: missing terminating " character test.cpp:1:8: error: 'include' does not name a type test.cpp: In function 'int main()': test.cpp:4:3: error: 'cout' was not declared in this scope test.cpp:5:1: error: expected primary-expression before '}' token test.cpp:5:1: error: expected ';' before '}' token | |||
analoginya ! Buka '{' . Tutup '}'
| |||
system("pause); kurang tanda petik... sama } yg didepan itu harusnya {, kaya yg dibilang mas suganda
ini di linux? kalaupun syntaxnya udah bener ttp gak bisa deh | |||
coba pake #include <iostream.h>
| |||
lagian emg ada system("pause") di linux?
| |||
test.cpp:1:1: error: stray '\342' in program
test.cpp:1:1: error: stray '\200' in program test.cpp:1:1: error: stray '\252' in program test.cpp:1:1: error: stray '#' in program test.cpp:1:1: error: stray '\342' in program test.cpp:1:1: error: stray '\200' in program test.cpp:1:1: error: stray '\216' in program test.cpp:1:1: error: stray '\342' in program test.cpp:1:1: error: stray '\200' in program test.cpp:1:1: error: stray '\254' in program test.cpp:1:8: error: 'include' does not name a type test.cpp: In function 'int main()': test.cpp:5:1: error: 'cout' was not declared in this scope | |||
test.cpp:1:8: error: 'include' does not name a type .. coba pake #include(spasi)<iostream.h> .. Jangn lupa spasi
| |||
Original Page: http://www.facebook.com/groups/253614674650545/?id=864354556909884
Sent from Feeddler RSS Reader
Sent from my iPhone






0 comments:
Post a Comment