Friday, September 12, 2014

[ask] compile code C++ malah error test.cpp:6:9: warning: missing terminating "


[ask] compile code C++ malah error d...

Muhammad Andi Putranto 8:06am Sep 7
[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???

Muhammad Andi Putranto 8:07am Sep 7
ini code C++nya

#include<iostream>
using namespace std;
int main ()
}
cout<<"hello world! \n";
system("pause);
return 0;
}

Suganda Sulung 8:08am Sep 7
coba ganti jadi : #include<iostream> using namespace std; int main () { cout<<"hello world! \n"; system("pause); return 0; }

Suganda Sulung 8:09am Sep 7
itu yg depan kyknya kebalik... Untuk mulai pake tanda -> {

Muhammad Andi Putranto 8:10am Sep 7
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

Suganda Sulung 8:10am Sep 7
analoginya ! Buka '{' . Tutup '}'

Reni Septiana 8:11am Sep 7
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

Suganda Sulung 8:12am Sep 7
coba pake #include <iostream.h>

Reni Septiana 8:12am Sep 7
lagian emg ada system("pause") di linux?

Muhammad Andi Putranto 8:15am Sep 7
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

Suganda Sulung 8:19am Sep 7
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