Multi Forum Altomesima
Multi Forum Altomesima
Multi Forum Altomesima
Home | Profilo | Discussioni attive | Utenti | Cerca | FAQ
 Tutti i Forum
 Linguaggi di programmazione
 Linguaggio C
 librerie STL

Nota: Devi essere registrato per poter rispondere.

Dimensioni video:
Nome Utente:
Password:
Messaggio:

* HTML abilitato
* Codice Forum disabilitato
Faccine
Felice [:)] Davvero Felice [:D] Caldo [8D] Imbarazzato [:I]
Goloso [:P] Diavoletto [):] Occhiolino [;)] Clown [:o)]
Occhio Nero [B)] Palla Otto [8] Infelice [:(] Compiaciuto [8)]
Scioccato [:0] Arrabbiato [:(!] Morto [xx(] Assonnato [|)]
Bacio [:X] Approvazione [^] Disapprovazione [V] Domanda [?]

 
   

C O N T R O L L A    D I S C U S S I O N E
frea Inviato - 13/12/2003 : 00:09:57
Salve a tutti

ho provato a usare le librerie STL ma non ci riesco.
Scrivendo semplicemente :
#include
int main() {
return 0;
}

e in compilazione
g++ prova1.cpp

mi dice
prova1.cpp:1:17: stl.h: No such file or directory

allora mi sono ingegnato e ho scritto:
g++ prova1.cpp -I/usr/include/g++-3/ -L/usr/include/g++-3/ -lstl

...e il risultato è il seguente:
In file included from /usr/include/c++/3.2.2/backward/new.h:34,
from /usr/include/g++-3/stl_algobase.h:52,
from /usr/include/g++-3/algorithm:30,
from /usr/include/g++-3/stl.h:4,
from prova1.cpp:1:
/usr/include/c++/3.2.2/new:79: `size_t' undeclared in namespace `std'
/usr/include/c++/3.2.2/new:79: declaration of `operator new' as non-function
/usr/include/c++/3.2.2/new:79: invalid declarator
/usr/include/c++/3.2.2/new:80: `size_t' undeclared in namespace `std'
/usr/include/c++/3.2.2/new:80: declaration of `operator new []' as non-function
/usr/include/c++/3.2.2/new:80: invalid declarator
/usr/include/c++/3.2.2/new:83: `size_t' undeclared in namespace `std'
/usr/include/c++/3.2.2/new:83: parse error before `::' token
/usr/include/c++/3.2.2/new:83: `operator new' takes type `size_t' (`unsigned
int') as first parameter
/usr/include/c++/3.2.2/new:84: `size_t' undeclared in namespace `std'
/usr/include/c++/3.2.2/new:84: parse error before `::' token
/usr/include/c++/3.2.2/new:84: `operator new' takes type `size_t' (`unsigned
int') as first parameter
/usr/include/c++/3.2.2/new:89: `size_t' undeclared in namespace `std'
/usr/include/c++/3.2.2/new:89: parse error before `*' token
/usr/include/c++/3.2.2/new:89: `operator new' takes type `size_t' (`unsigned
int') as first parameter
/usr/include/c++/3.2.2/new: In function `void* operator new(unsigned int,
...)':
/usr/include/c++/3.2.2/new:89: `__p' undeclared (first use this function)
/usr/include/c++/3.2.2/new:89: (Each undeclared identifier is reported only
once for each function it appears in.)
/usr/include/c++/3.2.2/new: At global scope:
/usr/include/c++/3.2.2/new:90: `size_t' undeclared in namespace `std'
/usr/include/c++/3.2.2/new:90: parse error before `*' token
/usr/include/c++/3.2.2/new:90: `operator new' takes type `size_t' (`unsigned
int') as first parameter
In file included from /usr/include/g++-3/deque:31,
from /usr/include/g++-3/stl.h:5,
from prova1.cpp:1:
/usr/include/g++-3/stl_alloc.h:704: warning: `typename
__default_alloc_template::_Obj' is implicitly a typename
In file included from /usr/include/g++-3/deque:34,
from /usr/include/g++-3/stl.h:5,
from prova1.cpp:1:
/usr/include/g++-3/stl_deque.h:1043: warning: `typename deque<_Tp, _Alloc,
__bufsiz>::iterator' is implicitly a typename
In file included from /usr/include/g++-3/list:34,
from /usr/include/g++-3/stl.h:8,
from prova1.cpp:1:
/usr/include/g++-3/stl_list.h:595: warning: `typename list<_Tp,
_Alloc>::iterator' is implicitly a typename

Quale mostruoso errore posso aver commesso???
2   U L T I M E    R I S P O S T E    (in alto le più recenti)
frea Inviato - 13/12/2003 : 20:54:39
Grazie mille!
Ciao!
mimc Inviato - 13/12/2003 : 20:41:26
Ciao,
il forum tratta del linguaggio C non il C++, in tali casi si direbbe sei OT Off Topic (ehe..)
Comunque
Prova a guardare in questo sito
che spiega la Standard Template Library:
http://www.bo.cnr.it/corsi-di-informatica/corsoCstandard/35STL.html
per l'indice degli argomenti del corso vai:

http://www.bo.cnr.it/corsi-di-informatica/corsoCstandard/01Indice.html
e dai una occhiata a
http://www.sgi.com/tech/stl/download.html

Vai all'inizio della pagina Multi Forum Altomesima - © 2002 -2008 Altomesima Online
Questa pagina e' stata aperta in 0,04 secondi. Superdeejay.net | Snitz Forums 2000