I'm working on a project for school and I've hit a bit dead end. Part of the project requires us to have a class that uses an array. We must use an array (sadly we can't use vectors). I'm trying to figure out how to construct an array in the class at run time. I don't need to actually put anything in it initially, i just need to constructor to make the array a certain size. Any feed back or help is greatly appreciated. Here's what i have so far for the class and the constructor. This project is being done in c++.
#pragma once
#include <iostream>
#include <string>
using namespace std;
class Node
{
public:
int size;
string container[];
Node ( int s, string c[]);
};
Node::Node (int s, string c[])
{
size=s;
***I need something here that will give string container[] the size of "size"***
}
Thank you in advance.