expected unqualified-id before.....
Grigory Zagorodnev
grigory_zagorodnev@linux.intel.com
Fri Feb 10 09:45:00 GMT 2006
Names vector, string etc are the part of C++ Standard library and belong
to std namespace. You either need to uncomment "using namespace std;" or
use qualified names like std::vector.
- Grigory
Mauro Alberti wrote:
> Hello all,
>
> I have a problem compiling a cpp wich seems to me correct, this is the error:
>
> iniToXml.cpp:18: error: 'string' does not name a type
> iniToXml.cpp:19: error: 'string' does not name a type
> iniToXml.cpp:21: error: expected constructor, destructor, or type
> conversion before '<' token
> iniToXml.cpp:22: error: expected constructor, destructor, or type
> conversion before '<' token
> iniToXml.cpp:23: error: expected constructor, destructor, or type
> conversion before '<' token
> iniToXml.cpp:26: error: expected constructor, destructor, or type
> conversion before '<' token
> iniToXml.cpp:47: error: expected constructor, destructor, or type
> conversion before '<' token
> iniToXml.cpp:57: error: expected constructor, destructor, or type
> conversion before '<' token
> iniToXml.cpp:60: error: expected unqualified-id before 'for'
> iniToXml.cpp:60: error: expected constructor, destructor, or type
> conversion before '<' token
> iniToXml.cpp:60: error: expected unqualified-id before '++' token
> iniToXml.cpp:89: error: expected unqualified-id before 'do'
> iniToXml.cpp:112: error: expected unqualified-id before 'while'
> iniToXml.cpp:113: error: expected unqualified-id before 'return'
> iniToXml.cpp:114: error: expected declaration before '}' token
>
> What should i do?
>
> Best regards
>
> A. Mauro
>
>
> ------------------------------------------------------------------------
>
> #include <xercesc/dom/DOM.hpp>
> #include <xercesc/util/PlatformUtils.hpp>
> #include <xercesc/util/XMLString.hpp>
> #include <iostream>
> #include <vector>
> #include <string>
> #include <cstdlib>
> #include <sstream>
> #include <stdexcept>
>
> XERCES_CPP_NAMESPACE_USE
>
> //using namespace std;
>
> struct Dati {
> int lvl; //indica il livello gerarchia dei dai nel fileini
> int type; //indica il tipo di nodo (element, text,comment...)
> string elemento;
> string valore;
> };
> vector<string> parse(FILE* ilfile);
> vector<string> delSpaces(vector<string> file);
> vector<Dati> solve(const vector<string> file);
More information about the Gcc-help
mailing list