Thanks guys. I'm going to give jverkoey's suggestion a try. It seems to make sense if I can get it to work!!
Type: Posts; User: LouB
Thanks guys. I'm going to give jverkoey's suggestion a try. It seems to make sense if I can get it to work!!
I have a program where I have an array of memory called hypomem[10000]. I have implemented a cpu simulator which loads a program into hypomem, then executes the program (which is written in machine...
Thanks Swoopy!!! That works! I appreciate your help.
It works if I do:
int main()
{
Filename = "test.txt";
//Load the program
PC = AbsoluteLoader(Filename);
I've tried that, and I"m getting error about converting char to char*. I'm not sure how to properly declare the variable, load the user input into that variable, and pass it to AbsoluteLoader...
I am getting ExecutableFilename as undeclared identifier as it's written here. I'm not sure where I declare it. I tried global and local without luck. I'm not good with pointers, so that is where I...
I need to ask the user to type in the file name, and open that file. Here are my functions, can you tell me what I'm doing wrong?
long AbsoluteLoader (char *ExecutableFilename)
{
int...
I tried that (building in Border) of course, but there is no exe file in my project folder ?!
yes, jlou, that answers my question. unfortunately, i've come to realize that since i have the introductory verision of vc++, i cannot utilize the exe. I also have Borland, which is not the intro...
I'm using Microsoft Visual c++, dos prompt program. How do I create an executable to save to disk?? There are text fils used in the program if that makes a difference. Thanks!
I"m making some progress I think. I believe I should be reading the bank2.txt file into the array like this:
int numrecs = 0;
custFile >> numrecs;
cust custArray[50];
..Should I be using a pointer???
Ok guys, I'm still having trouble here. I'm trying to make firstName an array within the custArray. I want to open the file bank2.txt, read the data into the array so I can make changes, then save it...
Thanks for your reply Elad...
Yes, this is correct.
correct again.
What is wrong with this code?? I'm having trouble getting the FirstName array to read in correctly, I'm not sure how to read the array into the array.
ifstream custFile;...
Thanks Hammer. I think that will work...
The names are coming out gargled, with only one field (either first or last name) and not both (first and last name), and the rest of the fields are re-formatting so for instance instead of...
thought it would be helpful if you had the code to run and see what it was doing.....
I'm having trouble with arrays. In the following program, I can open the file and access the data ok, but when it writes back to the outfile it's messing up the data. The text file is an attachment....
I am writing an ATM program that will contain a database of customers - name, address, account no., balance. etc. I need to perform transactions - withdrawals, deposits, account balance, transfer, tx...
Thanks Hammer.
I do have debugger, but don't know how to use it.
>>customerData& rec = *listArray[index];
How do you suggest I change this?
When I run this code, I get the prompt asking if I want to add a new record, I choose 'y', then I get an executable error. Can anyone tell me where the problem is?
//struct.h
#ifndef...
Ok. Maybe I'm going about this wrong. The purpose of the function is to insert the data. I copied this function from another program and then made changes to accomodate this program. But somewhere in...
Thanks Prelude!!
The arrow operator on
>Num->next [top++] = Num.target; //ERROR 2
Num is a pointer, try using the arrow operator instead (-> ).
My program should read five integers from a file called sample.txt, then print out the integers, add them, etc. using the overload functions. I seem to be having a problem with my isElement, insert...