is it any different when using a class in my code
my previous code i define my struct like this
Code:
#include <iostream>
#include <fstream>
#include <string>
struct{
int type 1;
string type2;
double type 3;
string type 4;
};
void print(){
//code to print in here
};
int main(){
print();
}
but i have to use a class now
so my code looks something like this
Code:
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
class Array_Class
{
public:
void Print();
private://behavior
int count; //do I define the struct here
int *A;
};
int main(){
print();
}
or do i still define it the same way at the top of my code.