Hi everyone,
can a I please pose a silly question, I've been working my way through a teach yourself book on c++ and ended up basically with a line of code that looked something like this:
cout<<result<<'\n';
Which worked fine, so I then decided I needed an extra line so I ended up with this:
cout<<result<<'\n\n';
Which did not work at all and I ended up with the following:
102570Please enter a character to exit
Now, I've worked out that this is due to using single quotes which only have a single byte storage capacity and I'm trying to store two bytes of data, but what I can't understand is the output, where does 102570 come from?
Many thanks,
Harvey



LinkBack URL
About LinkBacks



