Is there a way to add strings to a list without the quotation marks in C++?
-
I have a C++ file with over 4000 lines of first names, and I put all of the names in a list using
C++:
#include
#includeusing namespace std;
list list_name(99999, Aaren
Aarika
Abagael
... -
I have a C++ file with over 4000 lines of first names, and I put all of the names in a list using
C++:
#include
#includeusing namespace std;
list list_name(99999, Aaren
Aarika
Abagael
...See the red "Got a programming question?" link at the top. Not a good start as part of the community. :rolleyes:
CI/CD = Continuous Impediment/Continuous Despair
-
I have a C++ file with over 4000 lines of first names, and I put all of the names in a list using
C++:
#include
#includeusing namespace std;
list list_name(99999, Aaren
Aarika
Abagael
...What's not a secret signal is the stuff at the top of the page that you ignored. Ask here: https://www.codeproject.com/Questions/ask.aspx[^]
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
See the red "Got a programming question?" link at the top. Not a good start as part of the community. :rolleyes:
CI/CD = Continuous Impediment/Continuous Despair
I'm guessing the name means "Idiot finding out what I can get away with" - marketing dweebs don't care about accuracy ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
I have a C++ file with over 4000 lines of first names, and I put all of the names in a list using
C++:
#include
#includeusing namespace std;
list list_name(99999, Aaren
Aarika
Abagael
...No offence but everything about this is wrong. Posted in the wrong place, with the wrong formatting, using `std::list` is probably wrong (the C++ name for a list is `std::vector`), including `bits/stdc++.h` is wrong, `using namespace std` is .. OK not exactly *wrong* but a bad practice, and putting your data directly in the code instead of loading it from a file or resource is also questionable.
-
No offence but everything about this is wrong. Posted in the wrong place, with the wrong formatting, using `std::list` is probably wrong (the C++ name for a list is `std::vector`), including `bits/stdc++.h` is wrong, `using namespace std` is .. OK not exactly *wrong* but a bad practice, and putting your data directly in the code instead of loading it from a file or resource is also questionable.