Thread: problem

  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    84

    problem

    Code:
    #include <string>
    #include <vector>
    using namespace std;
    
    #define MAX_RACES 3
    #define MANA_S 1
    #define SPIRIT_S 2
    #define ANCIENA_S 3
    
    class Races
    {
    public:
    
    	Races (int A, int B, string C, string D, string E, float F, float G, float H, float I, float J, float K,
    		float L, float M, float N, float O, float P, float Q, float R)
    	{
    		int ID = A;
    		int magSkil = B;
    	    string name = C;
    	    string energy = D;
    	    string pPoint = E;
    		float attGrw[] = {F,G,H,I};
    		float eleRes[] = {J,K,L};
    		float phyRes[] = (M,N,O};
    		float magRes[] = {P,Q,R}; };
    
    }vector<Races>racesDB, *charRace;
    
    void LoadRaces()
    {
            racesDB.push_back;
    	racesDB[1].Races(3, ANCIENA_S, "a", "a", "a", 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5);
    
    	racesDB.push_back;
    	racesDB[2].Races(3, ANCIENA_S, "a", "a", "a", 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5);
    
        racesDB.push_back;
    	racesDB[3].Races(3, ANCIENA_S, "a", "a", "a", 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5);
    }
    ------ Build started: Project: Helios RPG - Beta, Configuration: Release Win32 ------
    Compiling...
    Main.cpp
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(24) : error C2958: the left parenthesis '(' found at 'c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\races.h(24)' was not matched correctly
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(25) : error C2059: syntax error : '{'
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(25) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(24) : error C2143: syntax error : missing ')' before '}'
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(24) : error C2440: 'initializing' : cannot convert from 'float' to 'float []'
    There are no conversions to array types, although there are conversions to references or pointers to arrays
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(24) : error C2143: syntax error : missing ';' before '}'
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(27) : error C2059: syntax error : '}'
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(27) : error C2143: syntax error : missing ';' before '}'
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(27) : error C2059: syntax error : '}'
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(31) : error C2065: 'racesDB' : undeclared identifier
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(31) : error C2228: left of '.push_back' must have class/struct/union
    type is ''unknown-type''
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(32) : error C2065: 'racesDB' : undeclared identifier
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(32) : error C2228: left of '.Races' must have class/struct/union
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(34) : error C2065: 'racesDB' : undeclared identifier
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(34) : error C2228: left of '.push_back' must have class/struct/union
    type is ''unknown-type''
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(35) : error C2065: 'racesDB' : undeclared identifier
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(35) : error C2228: left of '.Races' must have class/struct/union
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(37) : error C2065: 'racesDB' : undeclared identifier
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(37) : error C2228: left of '.push_back' must have class/struct/union
    type is ''unknown-type''
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(38) : error C2065: 'racesDB' : undeclared identifier
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(38) : error C2228: left of '.Races' must have class/struct/union
    Build log was saved at "file://c:\Documents and Settings\eng\My Documents\Visual Studio 2008\Projects\Project1\Helios RPG - Beta\Helios RPG - Beta\Release\BuildLog.htm"
    Helios RPG - Beta - 21 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    whats the problem and how can i use a push_back for object classes?

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    84
    Code:
    }*charRace;
    
    void LoadRaces()
    {
    	vector<Races>racesDB
    	racesDB[0].Races(3, ANCIENA_S, "a", "a", "a", 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5);
    
    	racesDB.push_back;
    	racesDB[1].Races(3, ANCIENA_S, "a", "a", "a", 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5);
    
        racesDB.push_back;
    	racesDB[2].Races(3, ANCIENA_S, "a", "a", "a", 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5);
    }
    ------ Build started: Project: Helios RPG - Beta, Configuration: Release Win32 ------
    Compiling...
    Main.cpp
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(23) : error C2958: the left parenthesis '(' found at 'c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\races.h(23)' was not matched correctly
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(24) : error C2059: syntax error : '{'
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(24) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(23) : error C2143: syntax error : missing ')' before '}'
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(23) : error C2440: 'initializing' : cannot convert from 'float' to 'float []'
    There are no conversions to array types, although there are conversions to references or pointers to arrays
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(23) : error C2143: syntax error : missing ';' before '}'
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(26) : error C2059: syntax error : '}'
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(26) : error C2143: syntax error : missing ';' before '}'
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(26) : error C2059: syntax error : '}'
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(31) : error C2146: syntax error : missing ';' before identifier 'racesDB'
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(31) : error C2274: 'function-style cast' : illegal as right side of '.' operator
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(33) : error C3867: 'std::vector<_Ty>:ush_back': function call missing argument list; use '&std::vector<_Ty>:ush_back' to create a pointer to member
    with
    [
    _Ty=Races
    ]
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(34) : error C2274: 'function-style cast' : illegal as right side of '.' operator
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(36) : error C3867: 'std::vector<_Ty>:ush_back': function call missing argument list; use '&std::vector<_Ty>:ush_back' to create a pointer to member
    with
    [
    _Ty=Races
    ]
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(37) : error C2274: 'function-style cast' : illegal as right side of '.' operator
    Build log was saved at "file://c:\Documents and Settings\eng\My Documents\Visual Studio 2008\Projects\Project1\Helios RPG - Beta\Helios RPG - Beta\Release\BuildLog.htm"
    Helios RPG - Beta - 15 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

  3. #3
    Registered User
    Join Date
    May 2009
    Posts
    84
    Code:
    #include <string>
    #include <vector>
    using namespace std;
    
    #define MANA_S 1
    #define SPIRIT_S 2
    #define ANCIENA_S 3
    
    class Races
    {
    public:
    
    	Races (int A, int B, string C, string D, string E, float F, float G, float H, float I, float J, float K,
    		float L, float M, float N, float O, float P, float Q, float R)
    	{
    		int ID = A;
    		int magSkil = B;
    	    string name = C;
    	    string energy = D;
    	    string pPoint = E;
    		float attGrw[] = {F,G,H,I};
    		float resGrw[][] = {J,K,L},(M,N,O},{P,Q,R}; };
    
    }*charRace;
    
    void LoadRaces()
    {
    	vector<Races>racesDB;
    
    	/*racesDB[0].Races(3, ANCIENA_S, "a", "a", "a", 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5);
    
    	racesDB.push_back;
    	racesDB[1].Races(3, ANCIENA_S, "a", "a", "a", 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5);
    
        racesDB.push_back;
    	racesDB[2].Races(3, ANCIENA_S, "a", "a", "a", 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5);*/
    }
    ------ Build started: Project: Helios RPG - Beta, Configuration: Release Win32 ------
    Compiling...
    Main.cpp
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(22) : error C2958: the left parenthesis '(' found at 'c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\races.h(22)' was not matched correctly
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(22) : error C2059: syntax error : ','
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(22) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(22) : error C2087: 'resGrw' : missing subscript
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(22) : error C2143: syntax error : missing ')' before ','
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(22) : error C2082: redefinition of formal parameter 'M'
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(22) : error C2082: redefinition of formal parameter 'N'
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(22) : error C2143: syntax error : missing ';' before '}'
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(22) : error C2082: redefinition of formal parameter 'O'
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(24) : error C2059: syntax error : '}'
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(24) : error C2143: syntax error : missing ';' before '}'
    c:\documents and settings\eng\my documents\visual studio 2008\projects\project1\helios rpg - beta\helios rpg - beta\Races.h(24) : error C2059: syntax error : '}'
    Build log was saved at "file://c:\Documents and Settings\eng\My Documents\Visual Studio 2008\Projects\Project1\Helios RPG - Beta\Helios RPG - Beta\Release\BuildLog.htm"
    Helios RPG - Beta - 12 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    The errors aside, a function that takes almost the whole alphabet in single character input parameters is DEFINITELY wrong.

    At the very least, give each parameter a decent name! [And ABSOLUTELY, do not use O as a variable name - in many fonts, it's almost impossible to tell O from 0, so you may think reading the code that x = O; means that x is zero].

    You probably want to package some of those parameters into their own struct/class, and pass the whole bunch at once.

    Code:
    		int ID = A;
    		int magSkil = B;
    	    string name = C;
    	    string energy = D;
    	    string pPoint = E;
    		float attGrw[] = {F,G,H,I};
    		float resGrw[][] = {J,K,L},(M,N,O},{P,Q,R};
    These are a bunch of local variables that are never used. What's the point of that?

    The error about resGrw missing subscript is that when you have multidimensional arrays, even when initializing them, you need to give all dimensions except the rightmost one. And you are missing the outer set of braces around the initialization.

    It seems like the code you have posted is a header file. This:
    Code:
    using namespace std;
    should NEVER go in a header file, as if there ever is another file using this header file that for some reason DO NOT want to use namespace std [perhaps it has it's own implementation of something that is normally in namespace std], then you have just broken that (and if the system is a bit complex, you may end up diggint through A LOT of code, particularly if it's a "implement the same thing as std::xxx, but fix a bug in the std::xxx - then we may end up with code that compiles perfectly, but because our resplacement xxx functionality is not what is being used, it hits the bug in the std::xxx functionality).

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    Registered User
    Join Date
    May 2009
    Posts
    84
    Quote Originally Posted by matsp View Post
    The errors aside, a function that takes almost the whole alphabet in single character input parameters is DEFINITELY wrong.

    At the very least, give each parameter a decent name! [And ABSOLUTELY, do not use O as a variable name - in many fonts, it's almost impossible to tell O from 0, so you may think reading the code that x = O; means that x is zero].

    You probably want to package some of those parameters into their own struct/class, and pass the whole bunch at once.

    Code:
    		int ID = A;
    		int magSkil = B;
    	    string name = C;
    	    string energy = D;
    	    string pPoint = E;
    		float attGrw[] = {F,G,H,I};
    		float resGrw[][] = {J,K,L},(M,N,O},{P,Q,R};
    These are a bunch of local variables that are never used. What's the point of that?

    The error about resGrw missing subscript is that when you have multidimensional arrays, even when initializing them, you need to give all dimensions except the rightmost one. And you are missing the outer set of braces around the initialization.

    It seems like the code you have posted is a header file. This:
    Code:
    using namespace std;
    should NEVER go in a header file, as if there ever is another file using this header file that for some reason DO NOT want to use namespace std [perhaps it has it's own implementation of something that is normally in namespace std], then you have just broken that (and if the system is a bit complex, you may end up diggint through A LOT of code, particularly if it's a "implement the same thing as std::xxx, but fix a bug in the std::xxx - then we may end up with code that compiles perfectly, but because our resplacement xxx functionality is not what is being used, it hits the bug in the std::xxx functionality).

    --
    Mats
    Well, I appreciate your concern but this piece of code is just a sample, so I don't mind those trivial things, I just need to know what causes those errors.
    P.S: I ALWAYS use the std, so it doesn't matter. And I need the std for the strings (if I remove the std it gives twice more errors)

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by ExDHaos View Post
    Well, I appreciate your concern but this piece of code is just a sample, so I don't mind those trivial things, I just need to know what causes those errors.
    P.S: I ALWAYS use the std, so it doesn't matter. And I need the std for the strings (if I remove the std it gives twice more errors)
    You may be using std right NOW, but if you don't learn how to use the tools properly, then you will sooner or later get into trouble.

    As to the actual error, part of it is what I pointed out earlier: you are missing a pair of braces. The rest of them are because you have mixed up a left parenthesis with a brace, and the compiler gets very confused because it gets "lost".

    To clarify "lost" here: If you imagine that you are telling your friend how to drive to your house, you tell your friend "Take the first left after the big oak-tree on the right, then the second right and then first left after the traffic lights", but unknown to you, someone cut down the big oak-tree. So your friend drives right past where the oak-tree was, and another 2 miles down the road, where there is another large oak... Now, it's all a mess, and your friend is likely to NEVER find your house without asking you again!

    Parenthesis, braces, brackets and semicolons are "road markers" for the compiler, so if there is one missing, or too many, and the compiler will not know what it's up to.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  7. #7
    Registered User
    Join Date
    May 2009
    Posts
    84
    Quote Originally Posted by matsp View Post
    You may be using std right NOW, but if you don't learn how to use the tools properly, then you will sooner or later get into trouble.

    As to the actual error, part of it is what I pointed out earlier: you are missing a pair of braces. The rest of them are because you have mixed up a left parenthesis with a brace, and the compiler gets very confused because it gets "lost".

    To clarify "lost" here: If you imagine that you are telling your friend how to drive to your house, you tell your friend "Take the first left after the big oak-tree on the right, then the second right and then first left after the traffic lights", but unknown to you, someone cut down the big oak-tree. So your friend drives right past where the oak-tree was, and another 2 miles down the road, where there is another large oak... Now, it's all a mess, and your friend is likely to NEVER find your house without asking you again!

    Parenthesis, braces, brackets and semicolons are "road markers" for the compiler, so if there is one missing, or too many, and the compiler will not know what it's up to.

    --
    Mats
    Thanks alot, but say could you please explain me how can I add vector elements for class objects?

  8. #8
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Do you mean like this?
    Code:
    class x
    {
        std::vector<int> v;
    ...
    }
    If not, please explain again what you want to do.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  9. #9
    Registered User
    Join Date
    May 2009
    Posts
    84
    Quote Originally Posted by matsp View Post
    Do you mean like this?
    Code:
    class x
    {
        std::vector<int> v;
    ...
    }
    If not, please explain again what you want to do.

    --
    Mats
    no, like something i tried in the code

  10. #10
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Seeing as I don't fully understand WHAT you are trying to achieve, that makes it very hard to explain how you SHOULD do that.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  11. #11
    Registered User
    Join Date
    May 2009
    Posts
    84
    Quote Originally Posted by matsp View Post
    Seeing as I don't fully understand WHAT you are trying to achieve, that makes it very hard to explain how you SHOULD do that.

    --
    Mats
    Code:
    }classesDB[MAX_CLASSES], *charClass;
    
    void LoadClasses()
    {
    	classesDB[0].classInfo(3, "Warrior", 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5);
    }
    I'm trying to do this but instead of using arrays I want to use vectors.

  12. #12
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    So, you either size/resize your vector as need be, or you create a temporary object and add it using push_back().

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  13. #13
    Registered User
    Join Date
    May 2009
    Posts
    84
    Quote Originally Posted by matsp View Post
    So, you either size/resize your vector as need be, or you create a temporary object and add it using push_back().

    --
    Mats
    Well I know that. But nevermind, I thought there supposed to be a special way too initialize class vector objects.

    Code:
    void LoadRaces()
    {
    	vector<Races>racesDB;
    
        racesDB.push_back(Races(1, ANCIENA_S, "a", "a", "a", 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5));
    
    	racesDB.push_back(Races(2, ANCIENA_S, "a", "a", "a", 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5));
    
        racesDB.push_back(Races(3, ANCIENA_S, "a", "a", "a", 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5));
    }
    Can I somehow declare the raceDB vector right after the class?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM