hello everyone, I'm trying to set up a class in c++ visual studio 2010. So i got my class.h file and class.cpp file now the problem is i want several string variables and even the file streams in that class. From what i understand i am suppose to define all my variables, methods etc in my header file and the bodies in the cpp file. How do i go around this. And most importantly how do i make a method in this header file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
//this is my header file
#pragma once
ref class myclass
{
private://private fields
staticint max_object_id;
staticint object_id;
public:
//constructor
myclass(void);
method://this is my attempt at making a method but the compiler doesn't //like it
create_complaint(int id, string text);
};
obviously this won't work because i don't have the string include. but i have no idea how to work on from this point. For some reason i dont have intellisense(working on it as we speak)in my windows form applications.