I did, right before it's inputted into the binary file it reads ok. I can't read line from line in my binary file because, for one, i can't just manually read it, two, i don't know if my code is...
Type: Posts; User: advocation
I did, right before it's inputted into the binary file it reads ok. I can't read line from line in my binary file because, for one, i can't just manually read it, two, i don't know if my code is...
Nothing shows up in my outFile. I know that it is inputting fine (not positive if inputting into the binfile right though) because I did a cout before it inputted into the binfile. I think it might...
Okkk, here goes. This is my code so far, and it appears my binary file either isn't working right, or just isn't outputing to my outFile (i'll go for probably the first option. Here is my code:
...
sorry, figured out my stupidity :)
Now i'm getting:
: error C2475: 'std::basic_istream<_Elem,_Traits>::get' : forming a pointer-to-member requires explicit use of the address-of operator ('&') and a qualified name
with
...
Yeah, your right, oh well, now I got another error. YEAH! :)
How do I read from an inFile using Visual C++? I am used to using inFile << intNum;
But this will not work with this compiler...
The only thing I know how to get is a char with inFile.get(char)
Ok, I don't even know where to start with this, but here goes the problem. First off, this all has to be in a class called BinaryFile. I have to create an account number, and account balance that...
All works fine. Thanks once again for your help.
Cool, no errors. Yeah, that was just a stupid mistake when I put in ostream into the function declaration instead of the other const ComplexNum. I changed everything around though, and I have no...
Ok, I am now getting these errors with this code:
#include <fstream.h>
#include <ostream.h>
class ComplexNum
{
public:
float real;
Quick question, I am going to be reading from an input file. How do I read two numbers from the input file and put them both into A like this? I belive this is why I have to overload the >> function?
Hey, cool. Thanks a lot for your help!!!
I have a program in which you have to overload the operators (all under a class called ComplexNum) >>, <<, +, -, /, and *. My program is that I must take two sets of numbers, each set having two...
I got it, cool; thanks!
Oh yeah, any idea on how to do the other problem i have now?
Ummm, ok, it sounds great; but I'm lost at how to do it. :)
I need to write a recursive function that takes an integer number (say 12) and change it to binary (1100) and I have no idea how to code it. Does anyone have any ideas?
Also, I have write another...
Ok, you're right, I just don't know hot to really use templates that well :P This is my first time implementing them. But do you know how I could fix this problem? I am trying to input everything...
Nope, all my functions that are called are of ItemType (declared ItemType item), and then are called with item.FunctionName();
That is fixed, I had to add template <class ItemType> to the last two functions; but now I get these errors:
runSortedLinkedList.cxx: In function `void FileToList(SortedType<ItemType>&,
...
Yes, you all should know my code by know :P Here it is again, changed once again:
SortedLinkedList.h
#include "ItemType.h"
template<class ItemType>
struct NodeType;
Ok, I already have my SortedLinkedList.h and my runSortedLinkedList.cxx up, so here is the rest of the code:
SortedLinkedList.cxx
#include "SortedLinkedList.h"
template<class ItemType>...
Nevermind, I got that to work, my stupid mistake. But now, since I put everything in i get these error codes :( :
/tmp/ccbyVii5.o(.text+0x43): In function `main':
: undefined reference to...
Great!! Thank you so much, but now I have one problem that was not identified before. I have a function returning a character in ItemType so that is why I belive that I am getting this error:...
Hello, this is sort of a follow up to my last question. I figured out my problem there, and it was I had to use templates. My problem now is this is my first time using templates, and here are my...