[cpp]//! @file ITypes.h
#ifndef _JE3D_ITYPES_H_
#define _JE3D_ITYPES_H_
#include <string>
#include <vector>
namespace JE3D
{
//! The engine's common string class.
/**
So the application and engine don't
need to both include the string header,
this is used to get around it.
**/
typedef std::string string;
typedef std::vector vector;
};
#endif[/cpp]
[code]..\include\ITypes.h|18|error: expected initializer before "vector"|[/code]
Why, why, wy does this happen?
It's probably because vectors need to be templated. std::vector<int> etc.
Why not just do
[cpp]
using std::string
using std::vector
[/cpp]
(I think that's the syntax)
[cpp]//! @file ITypes.h
#ifndef _JE3D_ITYPES_H_
#define _JE3D_ITYPES_H_
#include <string>
#include <vector>
using std::string;
using std::vector;
#endif[/cpp]
Fixed.
[QUOTE=Eleventeen;18005976][cpp]//! @file ITypes.h
#ifndef _JE3D_ITYPES_H_
#define _JE3D_ITYPES_H_
#include <string>
#include <vector>
using namespace std::string;
using namespace std::vector;
#endif[/cpp]
..\include\ITypes.h|9|error: `string' is not a namespace-name|[/QUOTE]
My bad, remove the "namespace" (See above)
[size=5]AP 8, the Swedish Academy announced the 2009 Nobel Prize for Literature awarded German writer and poet Hetamile. [/size][url=http://www.polofr.net/lacoste-polo-homme-c-21.html][size=5][color=#1c57c7]Lacoste polo Homme[/color][/size][/url][size=5]It is reported that Miller is not a well-known writer, and she is the second Glass-after prize for literature was a German writer, German writer Miller received the Nobel Prize for Literature in 2009, it being widely regarded as "upset." [/size][url=http://www.polofr.net/lacoste-polo-femme-c-22.html][size=5][color=#1c57c7]lacoste polo Femme[/color][/size][/url][size=5]At the award decision to the Swedish Academy said that Miller's work "both poetry and prose frank concise, describes nothing, nothing to the situation of persons sustenance." She will receive 10 million Swedish kronor [/size][url=http://www.polofr.net/index.php][size=5]lacoste polo t-shirt[/size][/url][size=5] (1.4 million U.S. dollars) in prize money. Swedish Academy Permanent Secretary [/size][url=http://www.polofr.net/ralph-lauren-homme-c-23.html][size=5][color=#1c57c7]Ralph Lauren Femme[/color][/size][/url][size=5] Engelongde the face of foreign journalists in Swedish, English and German, read the jury's decision. He said Miller with a wide range of language and literature to show the world through their own environment for the growth and later life of sentiment in a foreign country, she concise and straightforward language of a rich description of an emotional story.[/size][url=http://www.polofr.net/ralph-lauren-homme-c-23.html][size=5][color=#1c57c7]Ralph Lauren Homme[/color][/size][/url]
Sorry, you need to Log In to post a reply to this thread.