I am trying to reverse a string using head() (first letter of a string) and tail() (all letters after the head) functions from a class I wrote. Everything is working alright except my output's not...
Type: Posts; User: orikon
I am trying to reverse a string using head() (first letter of a string) and tail() (all letters after the head) functions from a class I wrote. Everything is working alright except my output's not...
That makes a lot of sense, thanks so much. I've got it working now!
I'm writing a vector class that will add subtract multiply vectors etc, but I'm having trouble with the * operator. I need to multiply a vector (a complex datatype defined by the class) by an...
Thanks for the suggestions, that sounds like a good idea. I'll definitely consider doing that.
Hey its working great now! thanks so much, really appreciate it. I was somewhat familiar with pass by ref and pass by ref but didnt really understand it, but with that helpful explanation you gave...
I seem to be having some trouble with this. Im familiar with passing values between functions, but how would I pass values of a class between functions ?
ah that makes a lot of sense. I'll give that a shot. Thank you very much
Thanks, that got it working, but now I've added more code and its not working right again.
The cout statements in object::noticed should should change between 1 and 0 whenever you call case 93,...
Hi, I'm getting confused with this classes. Im able to pass values to the class, but I'm not getting the right output after I call it.
if the object is "noticed" (seen = 1) and the player doesn't...
ah i figured it out i just had to delete the array index beside the name and description in the updated code. Thanks!
sorry, I was still getting alot of errors,
Here's what I had with that code
object.cpp: In member function `void object::setup(const char**, const char**,
int)':
object.cpp:20: error:...
thanks for the help, but that didn't seem to work. though I did make a few changes and got rid of most of the errors.
btw im not sure how to use the std::string class
here's the updated code
...
I need help getting strings to work with my class. Integers, floats etc all seem to work, but strings won't. I think I need to use a pointer but I'm a noob and can't figure out how to do that.
...
Ah, that did it. Thanks very much.
ok, pretty much the same thig as what i had before except without the typos:
#include<iostream>
#include<cstdlib>
#include<cmath>
//Prototypes
int quad(double a, double b, double c, double...
lol, I appreciate the help guys. I fixed those typos, but I'm still getting most of the same errors. I did try Enahs's idea, but that didn't really work the way I wanted. I still can't figure out...
I can't figure out whats wrong with my program. It's supposed to calculate the quadratic formula using functions, but I think I'm messing up my function call. I get a lot of compiler errors (I'm...
Thank you so much, it's working now :D
You saved me a lot of time, really appreciate it
I have a master file listing 15 subfiles in the same directory. Each of these files has a name in the top line, and 2 digit numbers in each subsequent line (about 5 lines). What I need to do is open...