0
C++ printing object ânamesâ
I want to print my objectâs name. I wrote âcout << obj -> name << ââsâ << âpoints: â << obj -> points << endl;â Which is something that has worked many times before. But now, it prints out â âs points: *address of points*â. So the name is blank. I have no errors, but it prints out nothing. I think I know why it is printing the address of points and not the actual poinsettia because I wanted that to happen, but why does it not print anything where the name is supposed to be? Am I missing something really simple? Thanks for any help :)
7 Antworten
+ 4
Can you attach the code in which you are facing the problem
+ 2
edit this question by tapping the three dots on the right side then you will see + symbol tap it and add your code
0
Ok, how do I do that?
0
Oh I noticed it says âpoinsiettaâ instead of pointer. I think my keyboard was set to spanish haha
0
It only works with code from Sololearn, I think, and I wrote this on Visual Studio. So I dont think I can upload it. I didnt see an option for it at least
0
copy paste it on sololearn's c++
0
Or just use pastebin.