'string' in function prototype
Hi,
Here is a small portion of code that results in an error message "'string' was not declared in this scope".
Code:
#include <string.h>
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
using namespace std;
bool ReadBitmap(string); //<------------ doesn't like this
int main(int argc, char *argv[])
{
if(ReadBitmap("bg.bmp")==false) return 0; //read file...return if not opened
system("pause");
return 0;
}
Any regular type in the prototype such as char, float, long, etc would be acceptable. But 'strings' aren't well liked. I can do this with 'char' but would like strings since I am a VB dependent programmer. ;-)
So, I imagine there is something 'special' that I must do for this prototype. It probably involves some C++ wierd thing that I am still learning such as... **, (void), ->,*(char*), ., :: :-)
Looking for help.
Regards,
ChuckB