Hi,
I have a calculation (shown below):

total=(dogs + cats);

I want to be able to store the answer for total
I stupidly tried to put a cin statement underneath but that doesnt work.

What would i use?

Member Avatar for iamthwee

Post all your code.

It goes like basically
cout enter number of dogs
cin dogs

cout enter number of cats
cin cats

then that total part comes

It stores the values of dogs and cats but not the total part

Member Avatar for iamthwee

Need to see your code I'm afraid.

im trying to post it but my browser wont let me for some reason, i was able to post yesterday :-(
do u know how u would normally store an array value that has been calculated rather than entered by the user?

Member Avatar for iamthwee

Of course, but you would need to post your code so that I can explain it within context. What browser are you using?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.