Search:

Type: Posts; User: Maghappy

Search: Search took 0.01 seconds.

  1. Thread: C++ problem

    by Maghappy
    Replies
    2
    Views
    1,535

    For error detection I would write code to ensure...

    For error detection I would write code to ensure that all the digits are initilized into the array. Example if input is 123 the char array should be filled with 00123\n instead of 123/n(random...
  2. Replies
    10
    Views
    1,314

    OK I just ran your code and seem some room for...

    OK I just ran your code and seem some room for inprovement.
    1.)make your member variables protected. This gives you control over what is allowed to changeyour data and how.

    2.)use your classes...
  3. Replies
    10
    Views
    1,314

    First of all your BIGGEST mistake is by not...

    First of all your BIGGEST mistake is by not defining a default constructor. This can and will lead to hard to find problems. Also you could make a class Person and derive the others classes from...
  4. Replies
    17
    Views
    6,606

    Kinda new at file io but doesn't the first...

    Kinda new at file io but doesn't the first instance of a stream being attached to a file make it read and write protected from other streams unless specified not to be?
  5. Replies
    5
    Views
    3,090

    I wouldn't mind helping any if you need any...

    I wouldn't mind helping any if you need any assistance just drop me a line sometime. Is it going to be a windows program or console application?
  6. Replies
    5
    Views
    3,090

    DBZ fan huh? I have the damage values used in...

    DBZ fan huh? I have the damage values used in the Dragonball Z card game on hand if you would like them. Values are based on physical combat but implimenting energy attacks wouldn't be to hard once...
  7. Thread: date class

    by Maghappy
    Replies
    3
    Views
    2,379

    Why did you do get year the way you did? I don't...

    Why did you do get year the way you did? I don't see the logic in just not returning a value from the member function.
  8. Thread: ios errors

    by Maghappy
    Replies
    6
    Views
    1,449

    fstream fin(fileName); Try initilizing the...

    fstream fin(fileName);

    Try initilizing the fstream in the constructor. I believe that the nocreate and in flags can only be set at creation. But I could be wrong, initilizing at creation has...
  9. Replies
    6
    Views
    1,637

    I really wish I could find a good tutorial on...

    I really wish I could find a good tutorial on File IOStreams. I understand a little, just enough to et my self confused. :confused:
  10. Replies
    3
    Views
    1,851

    Personally I would just create a new linked list...

    Personally I would just create a new linked list from the two with a loop to read from them into it. Mainly like a constructor with arrays of head nodes, then it would loop threw each head node...
  11. Thread: Linked Lists

    by Maghappy
    Replies
    7
    Views
    1,158

    Hpp. Please note I had to save the extension the...

    Hpp. Please note I had to save the extension the header as a .c or it wouldn't upload so just change it to LinkedList.hpp
  12. Thread: Linked Lists

    by Maghappy
    Replies
    7
    Views
    1,158

    cpp

    cpp
  13. Replies
    4
    Views
    1,307

    bump from the dead:confused:

    bump from the dead:confused:
  14. Thread: guessing game

    by Maghappy
    Replies
    11
    Views
    2,817

    Coincidence I think not.:D

    Coincidence I think not.:D
  15. Thread: Linked Lists

    by Maghappy
    Replies
    7
    Views
    1,158

    I have a decent linked list at home I will post...

    I have a decent linked list at home I will post the source code when I get there.
  16. Thread: linked list

    by Maghappy
    Replies
    2
    Views
    892

    Depends on what the list is storing. Also what...

    Depends on what the list is storing. Also what is the linked list runing in(windows enviorment or dos box).
  17. Thread: memory leak

    by Maghappy
    Replies
    4
    Views
    1,494

    The biggest cause of memory leaks for beginner...

    The biggest cause of memory leaks for beginner programmers is stray pointers. Stray pointers occur when you lose focus of a pointer but don't delete the variable it pointedto on the heap. The...
  18. Replies
    4
    Views
    1,004

    What are you trying to draw in? A SDI windows...

    What are you trying to draw in? A SDI windows program maybe. The simplest way is to get a client DC to draw on(example in MFC) and use the line to function.

    void CMainWnd::OnLButtonDown(UINT...
  19. Replies
    1
    Views
    1,457

    I'll give you the short answer for now then...

    I'll give you the short answer for now then latter I will post a great example for you. The problem is in how you need to look at the linked list. I would make a LinkList object, have it create a...
  20. Thread: guessing game

    by Maghappy
    Replies
    11
    Views
    2,817

    Here it is for you. New and improved and full...

    Here it is for you. New and improved and full functional. A few suggestions I might include are:
    1) The program could use a infinite for loop to repeat until a break is called.
    2) Could...
  21. Thread: guessing game

    by Maghappy
    Replies
    11
    Views
    2,817

    Declare srand at the beginning of the main...

    Declare srand at the beginning of the main function

    main()
    {
    srand( (unsigned)time( NULL ) );
    //then the rest of your code

    try using #include <time.h>
  22. Thread: guessing game

    by Maghappy
    Replies
    11
    Views
    2,817

    You should initially seed the program with this...

    You should initially seed the program with this line. Please note that it should only be seeded once or it will return the same number again and again.

    srand( (unsigned)time( NULL ) );



    int...
  23. Thread: Homework

    by Maghappy
    Replies
    15
    Views
    5,225

    LOL I can tell already I am going to like this...

    LOL

    I can tell already I am going to like this online community. You guys think like me.
  24. Replies
    4
    Views
    1,307

    OK, now that I know how to write and read the...

    OK, now that I know how to write and read the class from a file where should I go from there? I don't need to be able to print it so text mode isn't neccessary. Can I use the data returned from a...
  25. Replies
    4
    Views
    1,307

    File IOStreams

    Hello,

    I am new to your boards but am a little experienced in C++. I am having troubles grasping the concept of File IO, if anyone has a link to a good tutorial or can explain it to me I will be...
Results 1 to 25 of 25