Search:

Type: Posts; User: wen_wen_dy

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    1,196

    Well, thanks a lot. I find it working now. Huh,...

    Well, thanks a lot. I find it working now. Huh, I'm feeling preety stupid now. It must've been very easy to figure out, lol.

    Anyway, thanks. Yeah, using string is much better.
  2. Replies
    5
    Views
    1,196

    Could you show me how to allocate memory and copy...

    Could you show me how to allocate memory and copy it? I've tried to allocate memory using:



    char *res = new char;


    and copying it into the array using strcpy:
  3. Replies
    5
    Views
    1,196

    Problem with char

    I'm having problem with my program here. See, I have an array of char* as data member in Action class. With the help of getFirst() function, I'm returning the value of the first element in the array....
  4. Replies
    54
    Views
    4,432

    Whoa?? How come?? It really works in my...

    Whoa?? How come??

    It really works in my computer... I don't know about it... I'm using devC++ and Quincy for compiling, and they give me the same result: it works!!

    Mmmm, after all, I think you...
  5. Replies
    54
    Views
    4,432

    Mmmm?? Replace this line at line 9: ...

    Mmmm??

    Replace this line at line 9:


    printf("%c\n", Number);

    Replace it with an error message like this:
  6. Replies
    12
    Views
    2,183

    Hey, what do you intend to do with this line?? ...

    Hey, what do you intend to do with this line??


    if(ifp & ofp)

    Shouldn't it be an expression?? Not only the variable's name....

    How about this?
  7. Replies
    54
    Views
    4,432

    Mmmm, you never uses do-while loop, do you? Do...

    Mmmm, you never uses do-while loop, do you?

    Do and while should always be in pair in do-while loop. You need read some reference.

    OK... This line:


    do-while loop{

    Should be replaced by:
  8. Replies
    12
    Views
    2,183

    Your AND operator is should be &&, not &, I...

    Your AND operator is should be &&, not &, I think...
  9. Thread: Gas Gadge

    by wen_wen_dy
    Replies
    5
    Views
    1,691

    Yes, to get floating point number, put the temp...

    Yes, to get floating point number, put the temp variable into float data type.

    And then, I think you should change the second expression within the for loop. I think it should be i <= 100, not i...
  10. Replies
    54
    Views
    4,432

    Don't worry... There is nothing to do with your...

    Don't worry... There is nothing to do with your %c. Doesn't matter whether you put %c or %8c. It still works! Don't worry! That's not the mistake of your program... Do you understand my previous...
  11. Replies
    54
    Views
    4,432

    Hey! How could you say that it doesn't work?? It...

    Hey! How could you say that it doesn't work?? It works, really. Though, you still have to make it tidier...

    It works for the first question, but when we enter a number for the second time, it...
  12. Replies
    54
    Views
    4,432

    Hello, You should use integer data type for...

    Hello,

    You should use integer data type for number. Otherwise, it wouldn't be able to be converted to character using %c. So, use int Number and replace all %g with %d for integer. OK?

    Hmm,...
  13. Replies
    54
    Views
    4,432

    Hey, hey... You cannot use two expression within ...

    Hey, hey... You cannot use two expression within the while loop's brackets. Remember the syntax for while loop:



    while(expression)
    {
    statements;
    }
  14. Replies
    54
    Views
    4,432

    In order to convert decimal ASCII code to their...

    In order to convert decimal ASCII code to their correspondent character, you can use special character:

    \ddd
    ddd is the ASCII code in octal number format (base-8 number)

    To print it, simply...
  15. Replies
    12
    Views
    2,666

    Instead of using getchar(), there is another way...

    Instead of using getchar(), there is another way to make the program stop before quitting and wait for the user to type anykey.
    The answer is... using : system("pause"); at the end of your code.
    ...
Results 1 to 15 of 15