Hi,
I was wondering why this part of a switch function does not pause to get user input.
switch(input)
{
case 1:
cout << endl << "CREATE YOUR CHARACTER" << endl;
Type: Posts; User: alyeska
Hi,
I was wondering why this part of a switch function does not pause to get user input.
switch(input)
{
case 1:
cout << endl << "CREATE YOUR CHARACTER" << endl;
So I now see what you meant.
Thanks, tabstop. I got it working now..
Hi tabstop,
I am calling it though from a completely different class. Is that what you meant?
Thanks!
Hi,
How do you call a class method inside a different class method? Here's what I have:
void cMenu::mission1()
{
cInventory.printInventory();
}
Okay, thanks a lot, laserlight!
I was just calling it from main like so:
Player profile;
profile.viewProfile;
I really appreciate your wanting to help. Thanks!
Hi laserlight,
Here is the function. It's actually a class method. I have also declared mName and mHitPoints private. Do I need to use a pointer for this?
void Player::viewProfile()
{
...
Hello,
What does this mean?
function call missing argument list; use '&Player::viewProfile' to create a pointer to member
Thanks!
Hi,
How do I properly put this to code? I am trying to return a string (name) from a function using reference.
std::string& name()
{
cout << "Enter your name: " << endl;
getline(cin,...
Hello,
int main(int argc, char **argv)
Does this mean int main takes two parameters argc and double(?)pointer argv? What does double pointer mean? Does that pertain to an array?
Is this used...
Yes, I actually edited it. Thanks, matsp.
float distance3(float 1px, float 1py, float 1pz, float 2px, float 2py,
float 2pz)
{
return sqrt(((2px - 1px)(2px - 1px)) + ((2py -...
Yes, I did..
Thanks guys, I think that solved the problem..
Hi,
What is wrong with this function?
float distance3(float 1px, float 1py, float 1pz, float 2px, float 2py,
float 2pz)
{
float dist = 0.0f;
float dist = sqrt(((2px -...
Hi,
What does debug assertion failed mean?
Thanks!
Well. How often is a number going to be greater than one larger than itself? (I mean you're testing whether 8 > 9, or -4 > -3;
it's just never going to happen.)
Thanks for pointing that out,...
Hello,
I am trying to make a function which will return the maximum value in an array. This function returns 0. I figured the for loop will iterate over all the elements of the array. It looks...
Hi,
I've been studying C++ for a few months now.. However, I just couldn't grasp completely how to apply pointers and references in codes. I think I understand how they work, though. I am having...
Hi matsp,
Actually no, I got it all wrong, it was supposed to be the even elements. Pointer syntax still confuse me, thanks for your help..
Thanks, laserlight and matsp..
I am still a little bit confused when it comes to pointers and actually, references too. Thanks for explaining the errors, laserlight. You're a fine teacher! Thanks!
Thanks for the quick reply and a very direct answer, laserlight..
I modified it, however, it only outputs the first even element, and it outputs it three times. Why do you think that is?
Thanks..
...
Hi everyone,
I am having this error:
error C2296: '%' : illegal, left operand has type 'int *'
What does this mean?
//Write a function countEven(int*, int) which receives
//an integer...
Thanks nepper.. it's much clearer now.. and the program's completely running. :)
I appreciate all your help.
Hi Salem..
Thanks for your help.
I made the revisions in the code but nothing changed in the output. Here's the revised function.
void LineSpace(float a, float b, int n, float* arrayOut)
{ ...
Hi everyone,
I am working on a code that generates n evenly spaced nodal points from a to b. It runs but I can't get to add interval to itself every iteration, and I am not sure if I got the formula...
How will you best differentiate the two?
i++; //and
++i;