Search:

Type: Posts; User: Terran

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    12
    Views
    1,311

    ahhh

    ahhh
  2. Replies
    12
    Views
    1,311

    Ok it almost works; write: void...

    Ok it almost works;

    write:


    void fincal2Frame::OnClose(wxCloseEvent &event)
    {
    theBar->RemoveIcon();
    fout.open("list.txt");
    fout << m_TheList->getSize() << "\n"; // write the...
  3. Replies
    12
    Views
    1,311

    ok so i have.. fin.open("list.txt");...

    ok so i have..


    fin.open("list.txt"); //Load the list of bills.
    if (fin && fin.peek()){ // if the file was found.
    while (!fin.eof() ){
    std::string TempName, TempCost;...
  4. Replies
    12
    Views
    1,311

    so somthing like this? I'm confused on how...

    so somthing like this? I'm confused on how getline works?



    fin.open("list.txt"); //Load the list of bills.
    if (fin && fin.peek()){ // if the file was found.
    while (!fin.eof()...
  5. Replies
    12
    Views
    1,311

    Ok so my write function works! void...

    Ok so my write function works!



    void fincal2Frame::OnClose(wxCloseEvent &event)
    {
    theBar->RemoveIcon();
    fout.open("list.txt");
    for (int i = 0; i < m_TheList->getSize();i++){
    ...
  6. Replies
    12
    Views
    1,311

    Writing to the file!

    Why does this tell me i'm missing ")"'s?

    p.s. Will it work? I'm not sure how to use ofstream great?


    void fincal2Frame::OnClose(wxCloseEvent &event)
    {
    theBar->RemoveIcon();
    ...
  7. Replies
    7
    Views
    1,077

    er. sorry, i meant that i was trying to write out...

    er. sorry, i meant that i was trying to write out whole objects instead of explicitly writing out each value held by the objects.
  8. Replies
    7
    Views
    1,077

    Because i am writing BillData Objects to the file...

    Because i am writing BillData Objects to the file an not the info they hold, so it made sense to use binary.
  9. Replies
    7
    Views
    1,077

    ok, so i have this as the read from file: ...

    ok, so i have this as the read from file:



    if (fin){ // if the file was found.
    BillData temp("","",wxDateTime::Now());
    fin.read((char *)&temp, sizeof temp);
    ...
  10. Replies
    7
    Views
    1,077

    Having troubile with fstead::read

    so i've got my write function to work that saves the file.



    ...
    fout.open("list.bin", std::ios::binary);
    for (int i = 0; i < m_TheList->getSize();i++){
    BillData billdat =...
  11. Replies
    4
    Views
    1,432

    anybody?

    anybody?
  12. Replies
    4
    Views
    1,432

    Stray \127? Waaaaaaaaa?

    I added some code, and i got
    C:\Users\Matt\Desktop\Projects\fincal2\fincal2Main.cpp|219|error: stray '\127' in program|
    so i commented it all out, but i still get it, what's going on? What does...
  13. Replies
    15
    Views
    3,763

    Well it would see that the main error was that i...

    Well it would see that the main error was that i overlooked initializing m_TheList in the GUIFrame constructor.

    also, i don't actually use "getData" because it seemed like a bad way to do things....
  14. Replies
    15
    Views
    3,763

    fair enough, here's all the relevant code, Ok...

    fair enough, here's all the relevant code,

    Ok then i will post code, attempt to bear with me,

    GUIFrame has a protected variable and an acesscor;



    ...
    protected:
  15. Replies
    15
    Views
    3,763

    More detective work seems to show that it's...

    More detective work seems to show that it's crashing when deque, (or vector) tries to access their internal iterators. Which i can't understand? I hope i havn't stumped the panal on this one!
  16. Replies
    15
    Views
    3,763

    For some reason, accessing the deque is causing...

    For some reason, accessing the deque is causing segfaults, and i really need to figure out why
  17. Replies
    15
    Views
    3,763

    It doesn't, it derives from GUIFrame which has a...

    It doesn't, it derives from GUIFrame which has a protected member of BillList.

    Edit: i see what you're getting at, Fincal2Frame has a handler (of the same name) that passes the info to the...
  18. Replies
    15
    Views
    3,763

    if(theString != "" && theCost > 0 && goodValue){...

    if(theString != "" && theCost > 0 && goodValue){
    ((BillDia*)GetParent())->AddBill(theString, theCost);
    ((fincal2Frame*)GetParent())->insertBill(theString, theCost, theDate);
    ...
  19. Replies
    15
    Views
    3,763

    This is also causing a segfault int ...

    This is also causing a segfault

    int getSize() {if( theList.empty()){ return 0;} else { int temp = theList.size(); return temp;}};
  20. Replies
    15
    Views
    3,763

    Deque Causeing a crash.

    ok so i have,



    class BillData
    {
    private:
    wxString Name;
    wxString Cost;
    wxDateTime DueDate;
  21. Replies
    2
    Views
    786

    Ahh then that's ok, cause i was thinking i'd get...

    Ahh then that's ok, cause i was thinking i'd get an error if tried to read from a non-existent file. So really i can just try to read the data and it's no big deal if it doesn't read it.
  22. Replies
    2
    Views
    786

    fstream questions!

    So in the constructor for my class, i want it to check to see if the list file is there list.bin if so i want it to open it, else wise, i'd like it to create it. I also want it to ignore it if it's...
  23. Replies
    5
    Views
    1,508

    i wasn't sure about the destructor. But i was...

    i wasn't sure about the destructor. But i was using deques because of their random insertion ability. but you may be right about using a struct.
  24. Replies
    6
    Views
    1,099

    Interesting idea, although a bit much for this...

    Interesting idea, although a bit much for this application.
  25. Replies
    6
    Views
    1,099

    Well i'm storing it as an int because i'm sorting...

    Well i'm storing it as an int because i'm sorting it by date. e.g. 612 > 610, so it goes before it in the list. So i'd be making life hard if i used it as a string. Unless i make a temporary string,...
Results 1 to 25 of 107
Page 1 of 5 1 2 3 4