3 lines, one of which is not even a line of C++, is not a program.
Write a program to do the first step. When I wrote "Don't do anything else until this works", I meant: Write a program to do this, compile it, and run it. Don't try to write any more code until what you wrote does what you want it to do. I'm sorry if I was too subtle.
Nobody here is going to do your homework for you.
Start with this:
1 2 3 4
int main()
{
// put your code here
}
If you want ot post your code again, post the whold program, not just 3 random line.
Questions about what you did post:
Why are you trying to print an error message? The first step is only to ask for a user's input and then print it out. No error handling. No printing of error messages. Just make sure you can correctly get input.
How many boxes: 2
Enter Mailing Address (<CR> to terminate)
BOB & PATRICK'S SEASHELL EMPORIUM
UNDER THE SEA, MD 12345
BOB & PATRICK'S SEASHELL EMPORIUM
UNDER THE SEA, MD 12345
BOX NUMBER 1 OF 2
BOB & PATRICK'S SEASHELL EMPORIUM
UNDER THE SEA, MD 12345
BOX NUMBER 2 OF 2
Rather than making fun of problem #1 it would be better to help out. Especially if @OP doesn’t have access to a photocopier. Maybe use carbon paper, take a phone picture or re-run the program, run the program simultaneously on multiple computers. How else to help out @OP?
#include <iostream>
#include <string>
#include <vector>
#include <iterator>
#include <algorithm>
int main() {
int numberboxes {};
std::cout << "How many boxes: ";
std::cin >> numberboxes;
std::cin.ignore();
std::cout << "Enter Mailing Address (<CR> to terminate)\n";
std::vector<std::string> addr;
for (std::string s; std::getline(std::cin, s) && !s.empty(); addr.emplace_back(s));
for (int n = 0; n < numberboxes; std::cout << "BOX NUMBER " << ++n << " OF " << numberboxes << "\n\n")
std::copy(addr.begin(), addr.end(), std::ostream_iterator<std::string>(std::cout, "\n"));
}
How many boxes: 2
Enter Mailing Address (<CR> to terminate)
BOB & PATRICK'S SEASHELL EMPORIUM
UNDER THE SEA, MD 12345
BOB & PATRICK'S SEASHELL EMPORIUM
UNDER THE SEA, MD 12345
BOX NUMBER 1 OF 2
BOB & PATRICK'S SEASHELL EMPORIUM
UNDER THE SEA, MD 12345
BOX NUMBER 2 OF 2