#Project help

25 messages · Page 1 of 1 (latest)

frail nexus
serene sapphire
#

Yo are you doing the University Of London Computer Science OOP course

runic dagger
#

I changed the code, so i can run it without the class. And on my system its working. Maybe set a breakpoint

serene sapphire
#

Could you send more code so it doesn't cut off

#

But looking at it you should probably add in a std::cin.ignore() before std::getline since there will be a \n hanging around

runic dagger
frail nexus
frail nexus
#

the code before this function

runic dagger
#

Did you try to debug with an breakpoint?

frail nexus
#

i did not, how should i do that?

runic dagger
#

What IDE you are using?

hollow acorn
#

@frail nexus add cin.ignore() or getchar() before getline to avoid the issue

frail nexus
#

getchar() same result

runic dagger
#

Maybe just watch a video how to debug. The basics arent that difficult. I dont use VSCode

#

You just have to set a breakpoint and do step over or step into into a function. So you can see what your program is actually doing and what is the content of your variables

frail nexus
#

i will in a while, but isn't this literally when i input 1 it will start computeCandlestickData function, which is just print 2 statements for now

runic dagger
#

You'll need this skill later anyway. For big projects for example

frail nexus
#

i literally don't get how it won't work

runic dagger
#

what works?

#

So the easiest approach is to debug it in my opinion

modern mantleBOT
#

This question is being automatically marked as stale.
If your question has been answered, type !solved.
If your question is not answered feel free to bump the post or re-ask.
Take a look at !howto ask for tips on improving your question.