Search:

Type: Posts; User: Zalbik

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: gets()

    by Zalbik
    Replies
    5
    Views
    1,358

    Just read your link. I suppose buffer overflows...

    Just read your link. I suppose buffer overflows might just be the thing to ruin my day :D
    -
    I just switched to fgets(), Thanks
  2. Thread: gets()

    by Zalbik
    Replies
    5
    Views
    1,358

    gets()

    Is there an equal command to gets() in C. I am storing a string into a character array and am using gets(). So I have something like:


    char dBuffer[100];

    gets(dBuffer);

    I would just like to...
  3. Replies
    3
    Views
    1,592

    quzah I really like the C++ ignore...oh well....

    quzah

    I really like the C++ ignore...oh well. As for the parameter combo:

    scanf("%c*[^\n]*%c", &response );
    I never would have thought that one up, thanks.
  4. Replies
    8
    Views
    6,012

    Bitwise is your friend

    Yep, bitwise is the way to go...and here you go for 32-bit binary!!!

    #include <stdio.h>
    /*------------------------------------------------------------*/
    /* Decimal to binary conversion */
    ...
  5. Replies
    3
    Views
    1,592

    do{}while loop trouble

    Where did I go wrong with this code for my do while loop?


    int main()
    {
    char response;

    do
    {
    /* My main code would be here */
  6. Grrrrrrr, I forgot about de-referencing. As...

    Grrrrrrr, I forgot about de-referencing.

    As for why...because I couldn't remember how :p

    Thanks for the help.
  7. What is the correct way to enter a float pointer?

    What am I messing up here? I am simply trying to enter a number as a dynamic float. I get the error:

    error C2679: binary '>>' : no operator defined which takes a right-hand operand of type 'float...
  8. I got. I changed: newNode = new ds_node;...

    I got.

    I changed:

    newNode = new ds_node;
    newNode->data1 = data1;
    newNode->next = NULL;
    to this:

    newNode = new ds_node;
  9. Ok...I read up on it ; tried it; and have yet to...

    Ok...I read up on it ; tried it; and have yet to figure it out. I read that you use the * operator to dereference the ptr. So I have been trying different versions of *data1; in different locations...
  10. I'll give it a try

    I'll give it a try
  11. Why does this sort when I do not use pointers?

    So all this program does is sort...at least some of the time.

    If you look at Version 1, I DO NOT use a pointer in my structure as char data1. This version works just fine. Enter [q w e r t] and...
  12. Replies
    2
    Views
    1,175

    Actually the hiccup mention helped me out....

    Actually the hiccup mention helped me out. Assuming this possible, I shut down the computer; Rebooted and now it works. Im guessing my playing with dynamic memory and not deallocating it killed my...
  13. Replies
    2
    Views
    1,175

    Do you know what this compiler error means?

    The following set of 3 files compile just fine when it is one program and I DO NOT use a class. When I broke it up into 3 files my compiler gets very angry with me.

    The program sorts using linked...
  14. Thread: Endless loop

    by Zalbik
    Replies
    6
    Views
    1,125

    Thanks...

    Thanks...
  15. Thread: Endless loop

    by Zalbik
    Replies
    6
    Views
    1,125

    Endless loop

    It works through the code then when I get to the "Do you wish to continue with the Database" and hit yes it LOOPs forever. To me it looks like it should work back though the code and then ask "Do you...
  16. Replies
    2
    Views
    1,335

    Thanks I forgot about EOF. I did say I looked at...

    Thanks I forgot about EOF. I did say I looked at it for way too long.

    Solution change the for loop to while(inData.get() != EOF) and EOF found.

    THX Hammer
  17. Replies
    2
    Views
    1,335

    Stop reading from a file

    This may be a simple problem to solve but I have spent way too much time on it.

    If I am reading from a file and I have a structure array of size 100 but only enough data in the file to fill 3...
  18. Replies
    3
    Views
    1,875

    Opening and closing files

    Could something like this be done in a the same program. Im trying to figure out why I cannot open a file I just wrote to. If it cannot be done then problem found. Or is this a big NO NO?

    ...
  19. Replies
    3
    Views
    2,185

    I have never done a typedef before. I'll try it...

    I have never done a typedef before. I'll try it out. It seems much easier to do it that way. Thanks.
  20. Replies
    3
    Views
    2,185

    Here, I'll do what I proboly should have done to...

    Here, I'll do what I proboly should have done to begin with...I'll post the program. I suppose it is best to see just what I did. Maybe there is a better way of putting the data into the file for me...
  21. Replies
    3
    Views
    2,185

    Putting Data into a 2D array

    I really went wrong with this one.

    I have a .txt file with the contents:

    1, 2, zz
    1, 9, ccc
    2, 3, lll
    2, 13, aaaaa
    3, 3, mmm
    3, 11, oo
  22. Replies
    4
    Views
    1,029

    Hey that works...thanks

    Hey that works...thanks
  23. Replies
    4
    Views
    1,029

    With this array I want to try and print only the...

    With this array I want to try and print only the characters ",2,3,4,5". My loop however first prints a bunch of junk and then will print ",2,3,4,5" so I take it that I am not doing it the correct way.
  24. Replies
    4
    Views
    1,029

    Accessing a colum in an Array

    I give up and am asking for help here. Im playing around with arrays and trying to get characters from within the array.

    int main()
    {
    char array[20] = "1,2,3,4,5,6,7,8,9,0";
    char ch[20];...
  25. Replies
    17
    Views
    2,392

    I think I got! I'll be testing it when I get home.

    I think I got! I'll be testing it when I get home.
Results 1 to 25 of 32
Page 1 of 2 1 2