Search:

Type: Posts; User: Jules

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: URGENT - fstream

    by Jules
    Replies
    3
    Views
    927

    URGENT - fstream

    I need to open a file to read to and write to at the same time.
    I cant do

    infile.open(....)
    outfile.open(...)
    ...
    ...
    ..
    outfile.close();
    infile.close();
  2. Replies
    8
    Views
    1,723

    Please find something and hit me over the head...

    Please find something and hit me over the head with it. It is a web page :rolleyes: how could I be so dense. Some times I surprise myself. If you hadn't of asked, I dont think it would have ever...
  3. Replies
    8
    Views
    1,723

    What I am doing is, I have a screen which...

    What I am doing is, I have a screen which captures certain information and saves it all to a text file. Once it has been saved, a new process is created which starts up my c++ exe which in turn does...
  4. Replies
    2
    Views
    1,259

    :eek: Ohhh Thanx for that. Had no idea that...

    :eek: Ohhh

    Thanx for that. Had no idea that was the case
  5. Replies
    2
    Views
    1,259

    writing back to the file

    I am trying to write back to the beginning of a file using the following:


    outfile.open(fileName, ios::in|ios::nocreate)

    Yes it writes to the beginning of the file but it seems to overwrite...
  6. Replies
    8
    Views
    1,723

    I cant get it to display with...

    I cant get it to display with System.Console.WriteLine(line) and I have no idea why...but if I do SpanMessage.InnerHtml = line then it displays the output to the screen. Any ideas as to why this...
  7. Replies
    8
    Views
    1,723

    I cant even get it to display the first line :(...

    I cant even get it to display the first line :( let alone looping through the whole file.

    System.Console.WriteLine(line); <--- I thought this would display at least the first line

    If I could...
  8. Replies
    8
    Views
    1,723

    displaying to the screen

    I am trying to display information back to my interface and dont know how to...I am really new to all this and I am stuck. What I was doing is:


    try
    {
    using...
  9. Replies
    1
    Views
    1,725

    writing to the beginning of the file

    I need to write back to the beginning of a file with overwritting it.
    Currently it opens without truncation but writes to the end of the file. How can I set it to the beginning?

    ...
  10. Thread: String problem

    by Jules
    Replies
    8
    Views
    1,127

    jlou...I can not thank you enough :D wow...what...

    jlou...I can not thank you enough :D wow...what an explanation, very clear and precise. FANTASTIC.

    Thankyou very much. Now I get it :p
  11. Thread: String problem

    by Jules
    Replies
    8
    Views
    1,127

    Sorry.....so does this mean int main(char "argc",...

    Sorry.....so does this mean int main(char "argc", char "*argv[]")
    is wrong. I didn't get it.


    I need to be able open a file using argv.... would I do this as

    iFile.open(argv,...
  12. Thread: String problem

    by Jules
    Replies
    8
    Views
    1,127

    Ooopps...froggy has just replied :) BUT ...

    Ooopps...froggy has just replied :) BUT


    Im still confused... I MUST have (2 char array parameters - one for the authors name...the other has some file's path)


    > int main(int argc, char...
  13. Thread: String problem

    by Jules
    Replies
    8
    Views
    1,127

    String problem

    I have a web interface that uses dos to start my program and sends it 2 parameters(string author, string fileName) to my main. My c++ program is not using the new standards (requirement) and does...
  14. Thread: opening an exe

    by Jules
    Replies
    1
    Views
    1,352

    opening an exe

    I have a web interface that is to send some information to a C++ exe file. Just for testing purposes, I have only create a main (in the prog) which creates a txt file. Once I click the button,...
  15. Thread: CGI and C++

    by Jules
    Replies
    1
    Views
    1,238

    CGI and C++

    I have a web interface that I need to link with my c++ program. Can anyone tell me how to link the two of them either using CGI or dll.

    The program needs two parameters 1. File name 2. user name....
  16. Thread: white spaces

    by Jules
    Replies
    2
    Views
    1,406

    white spaces

    Just something I dont understand...Lets say you had the follwing data in a file:

    cat and mouse
    dog and flea
    123

    fish and bait
    bird and worm
    456
  17. Replies
    1
    Views
    1,846

    Borland 4.5 -> 5.5

    At uni we have been using Borland 4.5 and at home I have .net and Borland 4.5. and now 5.5. Because Borland 4.5 doesnt work with <iostream> and requires <iostream.h>, we have never been shown how to...
  18. Replies
    7
    Views
    1,007

    Its a borland 4.5. Our lecturer says that he...

    Its a borland 4.5. Our lecturer says that he will only run our programs on what the uni has. Well the format of the code is exactly as it is above and then I just run it. I dont have anything like...
  19. Replies
    7
    Views
    1,007

    g++ -o myprog.exe run.cpp test.cp Huh!!! ...

    g++ -o myprog.exe run.cpp test.cp


    Huh!!! What is that?? Where do I put it...and can you please explain it. I have never seen anything like that. They surely didn't show or say anything at...
  20. Replies
    7
    Views
    1,007

    header files are driving me up the wall

    I have gone thru the FAQ and have gone thru search but I am still confused. My header file has only the class and is using the macro guards and my cpp file has the actual functions with an include. ...
  21. Thread: Character Arrays

    by Jules
    Replies
    15
    Views
    2,341

    Sorry if this seems like a silly question.... ...

    Sorry if this seems like a silly question....

    Why the const? What is this going to do and why is it important?
  22. Thread: Character Arrays

    by Jules
    Replies
    15
    Views
    2,341

    how about creating a pointer to a string ...

    how about creating a pointer to a string


    char *str= "smith";

    OR

    char *str;

    cout << "enter new name";
  23. Thread: Strings

    by Jules
    Replies
    3
    Views
    832

    Well I was originally reading in the words and...

    Well I was originally reading in the words and storing them into a linked list, but I thought that this might take up alot of memory because the file it is going to read has 1000's of words.

    Then...
  24. Replies
    10
    Views
    1,522

    This will do what you want. int main() { ...

    This will do what you want.


    int main()
    {
    ifstream infile("input.txt");
    ofstream outfile("wordlist.txt");

    char *word; //can hold a string of any length
  25. Thread: Strings

    by Jules
    Replies
    3
    Views
    832

    Strings

    I am trying to create a dynamic string array in C++ that will read in words from a file. The length of the words and how many words will belong in the array is unknown.

    In the class XYZ, there is...
Results 1 to 25 of 32
Page 1 of 2 1 2