I suck with google :mad: It always links me to pages asking me if i want to buy a domain. At least when I'm searching for C++ stuff.
Type: Posts; User: OttoDestruct
I suck with google :mad: It always links me to pages asking me if i want to buy a domain. At least when I'm searching for C++ stuff.
Makes sense. I've never had a problem understanding an If statement though, and usually whenever I do an if / else I make sure I use {} brackets.
I'm supposed to be able to describe a 'dangling else' error for a quiz, yet I've never seen this in any of my books, and I'm transferring into this uni so I don't know what others have covered - can...
Eh heres my entire code. I fixed that bug, except now I'm just plain getting frickin WEIRD stuff that I've no clue how to fix.....
#include <iostream>
#include <fstream>
#include <string>...
ARGH. Stuck on one more thing. I'm getting hung up on the part where it opens the input and output files. Heres the code I'm using to open them:
fin.open(ifile_name);
fout.open(ofile_name)
...
Thanks you two for help. Having three months off in the summer without doing much coding fried my brain :D . I was getting hung up on the fact that the professor mentioned that lines could have any...
I have a fairly simple assignment where I have to read a file, and print how many times each character occurs in an output file - I know how to do that, and I have that part done.
What I need to...
Like I said in the first part, I'm on an old compiler, putting the declaration outside main WILL NOT DO ANYTHING. I have 0 syntax errors. Its not reading when I use fsbin.read. Also my compiler...
I got the program in my last thread working, now I'm trying to get a program to read the binary file which it created in the last one. My only problem is that it won't read. At all.
NOTE:
I'm...
I keep getting "expression must be integral or enum data type" on the fstreams in this code :confused: . I'm guessing its something with the way I'm handling wiritng to the binary file (I'm having...
I'm scared :eek: .... that all made sense to me :D
I'm currently a (freshman) CS major, but all we do is Unix console programming, on a standard from probably about 10 years ago (why they teach it like that is beyond me). Anyways, is there any good...
Thats exactly what I needed to know :D
*Edit*
Except now I just realized I'm lost when you did this:
processorspeed(ps), memory(0), drivespace(ds)
Er.. heres what I'm trying to mean in code by the 'sending in one, two three, etc'
Payroll employee1(5,4,3,2,1); Payroll employee2(5,4,3,2); Payroll employee3 (5,4,3)
And keep continuing...
Looking at the tutorial on classes, at the constructor part:
Following part in public class:
Member function:
My problem lies that, say I have 5 variables in the private section of the...
Alright... I'm now getting core dumps and I can't see why.. then again I don't understand pointers at all... this is supposed to look at array and sort the pointers of pAscending without modifying...
Uh.. heres an attatched crappy photoshop of what I'm trying to do. Sorting an array using two pointer arrays full of pointers to the array, not values.
Could anyone give me a crash course on using a dynamically allocated pointer array to use pointers within it to point to values in an array?
Thanks, just got out of class, talked to professor afterwards and she said that would be fine.
The example the book gives is that 127.565031 rounds to 127.570000 so I don't know if that would be the way the program wants it done.
Ok I have everything coded out, but my rounding still doesn't work. According to the book (and the professor follows the book to the letter so if I don't do it like this thats about 50% off my grade)...
Decimal Hex
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
Thanks for the help the setflag stuff worked and I figured out the other problems.
That completely lost me.
*Edit*
This is making absolutely no sense to me. Heres the table section of code I currently have.
cout << "QTY DESCRIPTION UNIT PRICE TOTAL PRICE\n"
...
// September 27, 2003
// Takes input numbers for a register and calculates cost
#include <iostream.h>
#include <iomanip.h>
#define __USE_STD_IOSTREAM
int main(void)
{