+ 2
Help with dynamic matrix
I need to wtite dynamic matrix in which i need to enter words and if word will appear for the second time the programme will stop and show the word matrix.
10 ответов
+ 8
@Jimmy Pub
Ill just post a solution. Please wait...
EDIT :
Here is the Solution - https://code.sololearn.com/cPVS56SeJCWz/#cpp
On SoloLearn's Code Playground, you will have to input any number of strings and then click run when done. The output however, will be all unique strings till the first repetition / match is received.
+ 5
Can you provide a sample input and output as well? I am unable to fully understand what you need to do. Ill try my best to help.
+ 5
I have guessed the following as your requirement - :
Sample Input :
Hello
World
New
I
am
Hello //Stop here.
Sample Output :
Hello
World
New
I
am
+ 5
@Jimmy Pub
Classes? Why do you need classes for this simple code?
Well, but if you have a requirement, you may declare a string class and use it instead of char* (Also define overloaded == and = operators in the same), or use the standard string class from C++03...
+ 3
@Jimmy Pub
Sorry I got lost. Ill add comments in a new code so that its easier for you to understand...
One more thing. Do you have to create a class yourself or just use an existing one? As there is a nice string class built for us by C++03 developers...
If you want a new class, let me know...
And please tell me what all you were not able to understand from the code...
+ 2
Yes
+ 2
I just started learning OOP including pointers and "new" and i get this question but i don't know how i should do this
+ 2
@Kinshuk Vasisht
Okay,ty
+ 2
Okey,but how do this in classes ?
+ 1
Caz it's my homework ) For u it's ez but i i don't understand half of this code :)