Hozzászólások
A forditassal kapcsolatban szeretnek egy kis segiteseget kerni.
Mar minden dokumentaciot atneztem de nem jottem ra a megoldasra.
Ezert is fordulok ehhez a kozosseghez, hatha tud valaki segiteni.
A problema a kovetkezo:
Frissen telepitett RedHat 8.0 alatt hibauzenettel leall a forditas.
A korabbi RedHat 7.3 verzioval rendesen mukodott minden, ezert
nem ertem, hogy most mi a problema.
A file-ok a kovetkezok:
[MAKEFILE]
CXX= gcc -x c++
proba: proba.o
$(CXX) -o proba proba.o
proba.o: proba.cpp
$(CXX) -c proba.cpp
[PROBA.CPP]
#include
int main(void)
{
cout return 0;
}
[HIBAUZENET]
proba.cpp: In function `int main()´:
proba.cpp:11: `cout´ undeclared (first use this function)
proba.cpp:11: (Each undeclared identifier is reported only once for each
function it appears in.)
make: *** [proba.o] Error 1
Ha a headert ugy fuzom be, hogy
#include
Akkor figyelmeztetest kapok:
[FIGYELMEZTETES]
In file included from /usr/include/c++/3.2/backward/iostream.h:31,
from proba.cpp:5:
/usr/include/c++/3.2/backward/backward_warning.h:32:2:warning:
#warning This file includes at least one deprecated or antiquated header.
Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard.
Examples include substituting the
To disable this warning use -Wno-deprecated.
De a legnagyobb problemam az, hogy a
string valami;
egyaltalan nem mukodik. Hiaba probalom ´.h´ -val vagy anelkul:
#include
#include
A hibauzenet ugyanaz mint a fentebb emlitett.
Ilyenkor mit lehet tenni??
- A hozzászóláshoz be kell jelentkezni
Ha valakit erdekel akkor itt most leirom, hogy mi volt a problema megoldasa.
(koszonet a segitoknek!)
Az ujabb fordito mar szigorubban bellenorzi az ANSI C++ szabvanyban rogzitetteket.
Ennek megfeleloen kotelezo a namespace -ek hasznalata.
#include
std::cout
vagy
#include
using namespace std;
cout
- A hozzászóláshoz be kell jelentkezni