Hi so I'm writing code in C++ that asks the user to submit a message like "the house is green" and then store it an array that stores messages so this is what i have so far
#include <iostream>
using namespace std;
char message[100];//limits the message to 99 characters.
char arrayOfMessages [5];
cout<<"Please enter the message";
cin>>message;
I can´t figure out a way to make
arrayOfMessages[0]= message; // since doing this only stores the first position
Appreciate the help or suggestions if I should do something different in obtaining the message. Also this is an over simplified version but is the gist of what im trying, however im trying to make the array message be temporary so i can reuse it to request up to 5 messages from the user , in my code version I did this with a while cycle.