3 Posted Topics
Ok im passing in a string and i cant get it to convert to a char array. Ive tried this so far. [CODE]int MyString::find(const std::string& str) { char* newString = str; return 1; }[/CODE] Im pretty lost here. | |
Ok im trying to compile and keep getting this error: 38 ISO C++ forbids declaration of `string' with no type. Not sure what im doing wrong. Here is my code: my header file: [CODE]#ifndef PLAYER_H #define PLAYER_H #include <iostream> using namespace std; class MyString { public: int find(const string& str); … | |
So im just trying to understand a simple program in C++ but i keep getting an error when trying to compile this code. The error is [Linker error] undefined reference to `Player::getHeight()' . So i have my main code in one file called Main.cpp: [CODE]#include "Player.h" int main() { Player … |
The End.