ok so now i think in accordance to the second post the two assign member functions would be declared like this:
void assign(string obString);
void assign(const char *);
Type: Posts; User: kisiellll
ok so now i think in accordance to the second post the two assign member functions would be declared like this:
void assign(string obString);
void assign(const char *);
o and to add to this. the next step calls for another assign member function this time that accepts a character pointer. this one checks for assignment to self, and assigns a new value to this string...
Ok I posted something earlier about this but was asking for too much at once so I am going to try to break this up now as I find myself needing help.
Being a beginner to C++, I am right now stuck...
yeah i kind of knew it was alot at once. well its a new morning here so im back at it again. ill wait till i reach some problems before requesting help.
thanks for the tips so far though. being a...
DELETED!!! Too much code.
this is the first program for an intro to c++ class im taking. what i have coded is what the professor has asked for so im only following by the rules i was given.
anyways, thank you for the help....
I'm trying to create a Date Class to run with some predetermined input and I am having a tought time with a few areas.
I haven't coded in C or C++ for awhile so I have a feeling this code is going...
ok well i actually never fixed it. i modified some code somewhat like Adak just posted and it looked workable somewhat, but i was still getting junk.
i just used Adaks example and it seems to be...
ahhhhhh got it fixed now!
thanks for all the help!
yep just ran 2 accounts, and its not sorting for me. hmmm
its acting kind of strange now for me. it just worked with 5 accounts, but wont work for 2, 3, or 4 accounts.
basically its not sorting anything and my third line is coming up with garbage information.
hmm ok now it compiles, but its not sorting.
any ideas?
***THE TITLE SHOULD SAY SORTING A STRUCTURE NOT AN ARRAY!!!***
ok this is the last part i need finished for this program and its causing quite a headache.
basically im storing data in a...
in case you cant understand, this is how i want the output to look:
ACCOUNT LAST NAME BALANCE
100 washington 100.00
200 smith 200.00
i can...
ugh, more problems here.
now i am trying to format the output and am having trouble getting things to look the way i would like them too.
here is my code:
#include <stdio.h>
thanks for pointing out my dumb mistake!
yep, just noticed it. wow, thanks semi-colons.
i must have been on auto-pilot when i put that one in there.
even when i take out the fflush(stdin) statements the program outputs the same rubbish
ok so the idea behind this is i have a program where info is entered for an account number, a last name, and a balance and it is stored in a structure.
afterwards the info from the structure is...
Yeah I know about using gets and my style of using main, but its what my professor wants us to use for some reason. Its an introductory course so I think hes just trying to keep it simple for now,...
I have a simple program I am coding for my class and so far I have got the program to do what I want it to do, however I am not sure if I am using pointers as my professor had asked us to use in this...
alright fixed everything.
1. switched emp_name to [10][30]
2. added a 10 to specify the width of the float numbers being displayed "%10.2f"
3. set sum_gross, sum_net, and sum_tax to 0 so they...
Ok I got number 1 and 2 of my problems all set. I saw in my last thread you guys mentioning that, just forgot to switch the numbers around in the array. I also knew my answer to number 2, this being...
I'll list my problems first:
1. How can I have the decimal points aligned in my output?
2. One of the names being displayed in my output shows the first and second names of the array connected as...