For some reason my code compiles successfuly but it doesn't link. Here is the code:
Code:#ifndef __ENGINE_H__ #define __ENGINE_H__ #include <windows.h> #include <io.h> #include <fcntl.h> #include <gl/glew.h> #include <gl/wglew.h> #include <map> #include <string> #include <vector> #include <stdio.h> #include <stdarg.h> #include <stdlib.h> using namespace std; class VideoEngine { public: static int init(); static void clear(); static void addPath(const char *path); // paths static vector<char*> path; }; #endif //__ENGINE_H__Am I doing something wrong?Code:#include "Engine.h" void Engine::addPath(const char *path) { char *s = (char*)path; while(1) { char *p = new char[strlen(s) + 1]; char *d = p; while(*s != '\0' && *s != ',') *d++ = *s++; *d = '\0'; Engine::path.push_back(p); if(*s == '\0') break; else s++; } }



LinkBack URL
About LinkBacks


