Search:

Type: Posts; User: kwikness

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    2,210

    Awesome answers. Thank you both for your help.

    Awesome answers. Thank you both for your help.
  2. Replies
    3
    Views
    2,210

    [EOF Problem] Extra Character In Output

    I'm reading characters out of a text file and printing them to the console via this code:


    ifstream textFile;
    textFile.open(s.c_str(), ios::in);

    char c = NULL;
    while(!textFile.eof()) {...
  3. Replies
    11
    Views
    11,520

    Thanks guys.

    Thanks guys.
  4. Replies
    11
    Views
    11,520

    I'm not sure what you mean. I updated my code to:...

    I'm not sure what you mean. I updated my code to:


    int lineNumber = 0;
    while((c = getc(ifp)) != EOF)
    {
    fputc(c, stdout); //print char to screen
    ...
  5. Replies
    11
    Views
    11,520

    fputc(int, FILE *) problem

    I'm trying to write a program that inserts a number line into a text file.
    For some reason, fputc(int, FILE *) doesn't print out the int to stdout.


    #include <stdio.h>

    int main(int argc, char...
  6. Replies
    8
    Views
    2,833

    YES!! Solved!! Thank you so much Elysia! The...

    YES!! Solved!! Thank you so much Elysia! The problem was the missing return statement. Sometimes I just need someone to look at my code.
  7. Replies
    8
    Views
    2,833

    *Bump* Plz help. This is due today =(

    *Bump* Plz help. This is due today =(
  8. Replies
    8
    Views
    2,833

    Ok.. i'm getting there but i've hit a snag. When...

    Ok.. i'm getting there but i've hit a snag. When I print out the results, nothing comes out for the data of the switched node.

    Here's the updated source..

    ex32.c


    #include "tree.h"

    void...
  9. Replies
    8
    Views
    2,833

    Very clever Perspective =) How's this look? ...

    Very clever Perspective =)

    How's this look?


    BTREE findRightMostLeaf(BTREE root)
    {
    if (root != NULL)
    {
    if((root -> left == NULL) && (root -> right)) //node...
  10. Replies
    8
    Views
    2,833

    Binary Tree/Recursion

    Hi, i'm trying to write a function to find the rightmost leaf node (a node with no children).

    This is the code I have so far.


    #include "tree.h"

    void inorder(BTREE root);

    int main()
  11. Replies
    6
    Views
    1,405

    Solved The problem was in my cmp function....

    Solved

    The problem was in my cmp function. Instead of returning the difference between the two values, i was just returning a -1, 0, or 1.
  12. Replies
    6
    Views
    1,405

    Strange test results..

    Hi, I'm writing a program that reads data out of a text file and into an array of "student" structures.

    The array of structures is then sorted according to "grade". If two students have the same...
  13. Thread: Macro Trouble

    by kwikness
    Replies
    2
    Views
    1,195

    Thank you brew.

    Thank you brew.
  14. Thread: Macro Trouble

    by kwikness
    Replies
    2
    Views
    1,195

    Macro Trouble

    Hi, i'm having touble with this macro. The compiler is telling me that I have a stray backslash. I'm new to this preprocessor stuff and haven't been able to find a good, straightforward guide to it....
  15. Replies
    5
    Views
    1,720

    lol oops.. didnt see i had that defined as an int

    lol oops.. didnt see i had that defined as an int
  16. Replies
    17
    Views
    10,795

    Vs is good to start with

    Vs is good to start with
  17. Replies
    5
    Views
    1,720

    False statement evaluation?

    Hi, I have the following source:



    #include <stdio.h>
    #include <stdlib.h>
    #include <time.h>

    int main()
    {
  18. Replies
    5
    Views
    1,125

    I want to accomplish what these statements do: ...

    I want to accomplish what these statements do:

    char *temp[10];
    *temp = *b;

    But on one line.

    As in: I want to initialize a char pointer and assign it the value of *b
  19. Replies
    5
    Views
    1,125

    I understand, but how would I accomplish both the...

    I understand, but how would I accomplish both the initialization and declaration in one line?
  20. Replies
    5
    Views
    1,125

    Pointers Question

    Hi I was messing around with pointer in my program and ran into a problem. The compiler was giving me an initialization error for:



    void swap(char *a[10], char *b[10])
    {
    char...
  21. Replies
    5
    Views
    2,901

    Thank you very much for clarifying that for me....

    Thank you very much for clarifying that for me. My program works now. Now time to start on the string sorting part of the application.
  22. Replies
    5
    Views
    2,901

    3 Questions: Why is the compiler still giving...

    3 Questions:

    Why is the compiler still giving me a warning if the function parameter and function call match now? (When I don't use -Wall)

    In a previous post, you (Salem) told me to include the...
  23. Replies
    5
    Views
    2,901

    Thanks Salem, you're always a great help. =)

    Thanks Salem, you're always a great help. =)
  24. Replies
    5
    Views
    2,901

    Incompatible Pointer Type Warning

    StringSort.c:25: warning: passing arg 1 of `printDat' from incompatible pointer type


    for the following code:



    #include <stdio.h>
    #include <string.h>
  25. Replies
    7
    Views
    1,719

    www.cygnus-software.com/papers/comparingfloats/com...

    www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm

    Found the section on epsilon comparisons especially helpful. Thanks.
Results 1 to 25 of 62
Page 1 of 3 1 2 3