Search:

Type: Posts; User: val3ri3

Search: Search took 0.01 seconds.

  1. Thread: joining codes

    by val3ri3
    Replies
    5
    Views
    1,474

    If you use an array to store all those stations...

    If you use an array to store all those stations and 'for loops' to read from it, it'll make it so much easier to print/read from them

    C++ Tutorial - 10 - Beginning Arrays - YouTube

    once you...
  2. Solution This worked just fine. The mistake was...

    Solution
    This worked just fine. The mistake was coming from main. Minor error was ruining my read before i even called it. don't i feel embarrassed. but glad it really wasn't my read function

    ...
  3. Its not working out -858993460 -858993460 ...

    Its not working out


    -858993460 -858993460
    -858993460 -858993460
    -858993460 -858993460
    Press any key to continue . . .

    thats my output i took off the read
  4. Yes exactly like that! I'm going over the link...

    Yes exactly like that! I'm going over the link and changed my loop, but having a little trouble adjusting. Output still the same Changing my code as you read
  5. I do know that my program gets into my file...

    I do know that my program gets into my file because the "read file" does come up on my output but the values i get along with it are not the same values that i should be getting.
    What i needed is...
  6. My txt file im trying to read from is formatted...

    My txt file im trying to read from is formatted like this


    619847GBE 641 998
    418712IMB 107 867
    227451GEM 789 181
    981836KEA 747 171
    986516IGU 303 71
  7. What's wrong with my read function? read from a txt file to an array of object

    i need to read data from my txt file and iv got another function to print, but something must be wrong with my read function b/c my values turn out to be random negatives

    read function


    int...
  8. Replies
    29
    Views
    14,183

    Found my mistake! Post to come

    Found my mistake! Post to come
  9. Replies
    29
    Views
    14,183

    I kept putting it back as a desperate attempt...

    I kept putting it back as a desperate attempt hoping it would read through the file, but no. I've yet to find the mistake and im using classes
  10. Replies
    29
    Views
    14,183

    So here is an updated code here's MAIN ...

    So here is an updated code

    here's MAIN


    #include "inventory.txt"
    #include "myfile.h"
    #include <iostream>
    #include <string>
    #include <fstream>
  11. Replies
    29
    Views
    14,183

    my fault thought it better not to post the full...

    my fault thought it better not to post the full code but i should have here is main




    #include "myfile.h"
    #include <iostream>
    #include <string>
    #include <fstream>
    #include <iomanip>
  12. Replies
    29
    Views
    14,183

    let me post you more of the code so you can see

    let me post you more of the code so you can see
  13. Replies
    29
    Views
    14,183

    sorry posted that last one twice and ok i just...

    sorry posted that last one twice and ok i just removed it


    #include "myfile.h"
    #include <iostream>
    #include <string>
    #include <fstream>
    #include <iomanip>
    using namespace std;
  14. Replies
    29
    Views
    14,183

    main #include "inventory.txt" #include...

    main


    #include "inventory.txt"
    #include "myfile.h"
    #include <iostream>
    #include <string>
    #include <fstream>
    #include <iomanip>
    using namespace std;
  15. Replies
    29
    Views
    14,183

    Feels like it's right in front of me and i don't...

    Feels like it's right in front of me and i don't see it
    MAIN


    #include "inventory.txt"
    #include "myfile.h"
    #include <iostream>
    #include <string>
    #include <fstream>
    #include <iomanip>
  16. Replies
    29
    Views
    14,183

    Yes i fixed that my code looks cleaner, but im...

    Yes i fixed that my code looks cleaner, but im still getting my same error
  17. Replies
    29
    Views
    14,183

    void read(struct Item Itemlist[], string...

    void read(struct Item Itemlist[], string filename)
    {




    std::ifstream infile("filename.txt");
    std::ofstream outfile("filename.txt");
    infile.open("filename");
    for(int i=0; i<Max; i++)
  18. Replies
    29
    Views
    14,183

    Ok so this is what i have now in main ...

    Ok so this is what i have now in main


    #include "inventory.txt"
    #include "myfile.h"
    #include <iostream>
    #include <string>
    #include <fstream>
    #include <iomanip>
    using namespace std;
  19. Replies
    29
    Views
    14,183

    Ah sorry haha and Thanks so much Problem is im...

    Ah sorry haha
    and Thanks so much
    Problem is im still getting the error i think it's my read function
  20. Replies
    29
    Views
    14,183

    Please Look On my code.. Is that what you meant...

    Please Look On my code.. Is that what you meant for me to do?
  21. Replies
    29
    Views
    14,183

    In my main?

    In my main?
  22. Replies
    29
    Views
    14,183

    yea woah actually i accidentaly erased it when i...

    yea woah actually i accidentaly erased it when i copied the code on here but its on my code let me fix that
  23. Replies
    29
    Views
    14,183

    syntax error : 'bad suffix on number'

    #include <iostream>
    #include <string>
    #include <fstream>

    #include <iomanip>

    using namespace std;

    const int Max=100;
Results 1 to 23 of 23