История изменений
Исправление olibjerd, (текущая версия) :
Не-а, потому что записывается справа налево.
% cat test.cpp
#include <cstdio>
int main (void) {
string الله = "اکبر";
printf("%s\n", الله);
return 0;
}
% clang++ test.cpp
test.cpp:3:2: error: use of undeclared identifier 'string'; did you mean
'stdin'?
string الله = "اکبر";
^~~~~~
stdin
/usr/include/stdio.h:168:25: note: 'stdin' declared here
extern struct _IO_FILE *stdin; /* Standard input stream. */
^
test.cpp:3:8: error: expected ';' after expression
string الله = "اکبر";
^
;
test.cpp:3:10: error: use of undeclared identifier 'الله'
string الله = "اکبر";
^
test.cpp:4:18: error: use of undeclared identifier 'الله'
printf("%s\n", الله);
^
test.cpp:3:2: warning: expression result unused [-Wunused-value]
string الله = "اکبر";
^~~~~~
1 warning and 4 errors generated.
Исходная версия olibjerd, :
Не-а, потому что записывается справа налево.
% cat test.cpp
#include <cstdio>
int main (void) {
string الله = "اکبر";
printf("%s\n", الله);
return 0;
}
% clang++ test.cpp
test.cpp:3:2: error: use of undeclared identifier 'string'; did you mean
'stdin'?
string الله = "اکبر";
^~~~~~
stdin
/usr/include/stdio.h:168:25: note: 'stdin' declared here
extern struct _IO_FILE *stdin; /* Standard input stream. */
^
test.cpp:3:8: error: expected ';' after expression
string الله = "اکبر";
^
;
test.cpp:3:10: error: use of undeclared identifier 'الله'
string الله = "اکبر";
^
test.cpp:4:18: error: use of undeclared identifier 'الله'
printf("%s\n", الله);
^
test.cpp:3:2: warning: expression result unused [-Wunused-value]
string الله = "اکبر";
^~~~~~
1 warning and 4 errors generated.