OK thank you, it's simpler than I thought! And yeah, silly mistake with the voids, it's too late for me to think right now.
Type: Posts; User: rwebb2305
OK thank you, it's simpler than I thought! And yeah, silly mistake with the voids, it's too late for me to think right now.
So it's a prototype of a function? How would I intput which function to use? Would it be as simple as:
void PrintVals(void (*someFunc)(5, 5), 5, 5);
The title pretty much says it all, what does this declaration mean:
void PrintVals(void (*)(int&, int&),int&, int&);
I've been challenged by a book online (recommended from this website, it's...
That was much much simpler and easier to understand, thanks a lot!
Thanks for your comments but I'm still stuck...
I've tried using the strcpy but it's not working (it's the only operator that isn't in the example in the tutorial!). Here's my best attempt so far:...
I'm working my way through the C++ tutorials and I'm stuck on character arrays. Basically, I don't understand how a user can input a sentence into the program and then how to store that sentence in a...
OK, thanks these posts have helped a lot and I think I understand now.
Here's a link to the tutorial: C Strings - C Tutorial - Cprogramming.com
I'm a little confused on this part of the tutorial:
#include <iostream>
using namespace std;
int main()
{
That makes it so I do the loop when I input a correct value. My aim is for the program to shut down if it's correct, but ask again if an incorrect value is given, until a correct value is entered.
...
I want it to loop if there is invalid input, so that if something irrelevant is entered, nothing happens and it just waits for a correct response.
The
input == 0 must be wrong, but I'm not sure...
OK, that helps a lot, but the program still doesn't function as I want it to.
It's now set to:
} while (input==0);
But when I enter a value that comes to 0, the loop isn't initiated and the...
I struggled with that (and apparently still do after revisiting!) but your problems seem to be:
cout<<"your age is:"<< age ( x, 2011 - y ) <<"\n";
This should be written as
cout<<"your age...
http://www.cprogramming.com/tutorial/lesson5.html
Right at the bottom, it says
How would I go about doing this? I suppose the do..while loop would be best, so I tried that and here's my best...