Warning pri kompilaci

Veros Kaplan veros-XXXX na tac.cz
Pondělí Listopad 10 10:13:33 CET 2003


Lubomír Odráška wrote/napsal:
: Zdravicko,
: 
: In file included from /usr/include/c++/3.2/backward/iostream.h:31, from pokus.cpp:1: /usr/include.../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 <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Who-deprecated.
: 
: zdrojak je fakt primitivni (chvili jsem si myslel, ze neumim napsat ani primitovni kod v c++ :)) )
: #include <iostream.h>
: int main(void);
: int main(void)
: {
: cout<<"hello, tahats me.";
: return 0;
: }
: 
: nevite nekdo, co s tim? co to po me chce? :))

Ano,

   doporučuje s použít

#include <iostream>
using namespace std;

int main();

int main()
{
	cout << "Hello, world." << endl;
	return 0;
}

  Nebo při kompilaci použít -Wno-deprecated. Změnila se norma C++, jinak
nic :-)

Věroš Kaplan
--
Věroš Kaplan <veros @ tac . cz>
system disaster 
Tacoma Computers, Staňkova 18a, Brno, CZ                http://www.tac.cz/
--
 Názory v tomto mailu uvedené jsou moje vlastní a nemusí se shodovat 
 s názory mého zaměstnavatele.
--
||  Teplota mého procesoru je 50°C.
||
"A netykej mi. Nehráli jsme spolu Dooma po síti."
        -- zaslechnuto v počítačové hale FI MU


Další informace o konferenci Linux