Search:

Type: Posts; User: vsovereign

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    1,272

    C++ under windows?

    Can someone please tell me a good book to learn this.
    Also, while I can do basic C++, I am a bit vague about the meaning of C++ under Windows. Is it the same with programming MFC with Visual C++?
    ...
  2. Replies
    3
    Views
    19,483

    Okay, so I took your advice and created a small...

    Okay, so I took your advice and created a small program. I hope this can be integrated to the big program later :



    #include <stdio.h>
    int main()
    {
    int c, count;
    int word[100];
  3. Replies
    3
    Views
    19,483

    counting characters in an array?

    hi Newbie here :)

    I'm doing a program that should count how many words, characters, and how many characters per word inputted.

    I manage to do the first two, here's the program:



    #include...
  4. Replies
    7
    Views
    2,021

    Yeah, but if we input c = 0, won't it changed to...

    Yeah, but if we input c = 0, won't it changed to c = 48 because it's getchar() ?

    so it will be

    ndigit[c-'0'] = ndigit[c-'0'] +1 --> I input c = 0

    ndigit[c-'0'] = ndigit[48-48] +1 ...
  5. Replies
    7
    Views
    2,021

    so that means that if c = 0 -> c = 48 in ASCII ...

    so that means that if c = 0 -> c = 48 in ASCII

    so
    ndigit[48-48] = ndigit[48-48] + 1
    ndigit[0] = ndigit[0] + 1

    if we initialize ndigit[10] :


    for (i = 0; i < 10; i = i + 1)
  6. Replies
    7
    Views
    2,021

    one question about array

    Hi there,

    if there is a code like this :



    int c, ndigit[10];

    if (c >= '0' && c <= '9')
    ++ndigit[c-'0'];
  7. Replies
    2
    Views
    3,766

    Aahh okay :) So 10 digits + whitespace +...

    Aahh okay :)

    So 10 digits + whitespace + other, so yeah; 12 inputs.

    thanks!! :)
  8. Replies
    2
    Views
    3,766

    Twelve categories of input?

    I'm learning C from the book C Programming Language by Kernighan & Ritchie. I was told that this is the best book.

    In the chapter about Arrays they said :



    I don't understand! How come 12...
  9. Replies
    5
    Views
    2,750

    Okay thanks for the explanation :)

    Okay thanks for the explanation :)
  10. Replies
    5
    Views
    2,750

    Thanks! It's working now. I'm under the...

    Thanks! It's working now.

    I'm under the impression that EOF is [Enter] :P

    one more question :

    I have to write :
  11. Replies
    5
    Views
    2,750

    word count program not working

    Hi all,

    I'm trying to create a word count program. With the definition that a word is any sequence of characters that does not contain a blank, tab or newline.

    Every time the program...
  12. Replies
    6
    Views
    1,079

    Okay, so the original question I must answer is :...

    Okay, so the original question I must answer is :



    Therefore I thought that what the program should do is : when tab is pressed, \t is printed on the screen right away. Right now it is printed...
  13. Replies
    6
    Views
    1,079

    okay, so I put \\t instead of \t You're right,...

    okay, so I put \\t instead of \t
    You're right, now I can see \t

    But the thing is if I type :


    abcd tab efgh enter
    /t

    as you can see the /t is in the next line.
  14. Replies
    6
    Views
    1,079

    writing tab (\t) to the screen

    Hi, newbie here

    I'm trying to print \t character to the screen every time I press tab
    It doesn't work.
    here's my code


    #include <stdio.h>
    //program to print tab to the screen
    int main()
  15. Replies
    7
    Views
    1,613

    You're right!! I removed the \n and the program...

    You're right!! I removed the \n and the program works! THANKS! :)
  16. Replies
    7
    Views
    1,613

    I'm sorry I'm a newbie. I don't understand your...

    I'm sorry I'm a newbie.
    I don't understand your question.

    I compile my program...well I use a compiler...I don't know which way the compiler does the compiling.
  17. Replies
    7
    Views
    1,613

    What? It won't work in mine. Still stops working...

    What? It won't work in mine.
    Still stops working after I enter a value behind : enter the length

    Is it compiler problem?
    I'm using devcpp but my files are .c

    I changed my compiler to...
  18. Replies
    7
    Views
    1,613

    help with scanf...

    I use printf & scanf in the program below.
    I enter a value and then the value is used in the formulas.

    But all the program does is printing
    and although I can put some number... the program...
  19. Replies
    7
    Views
    24,471

    thank you for the help everyone :)

    thank you for the help everyone :)
  20. Replies
    11
    Views
    23,880

    return type of 'main' is not `int'

    The compiler keeps returning this message:


    return type of 'main' is not `int'

    and stops compiling.
    But I should be able to use void type with main shouldn't I?
  21. Replies
    3
    Views
    8,066

    thank you! :)

    thank you! :)
  22. Replies
    3
    Views
    8,066

    syntax error before '=' token

    Help! I don't know what's wrong...
    It keeps giving error message

    But I'm sure nothing is wrong... :(



    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
  23. Replies
    7
    Views
    24,471

    sorry, I was confused... is it correct to say...

    sorry, I was confused...
    is it correct to say that fprintf is when you want to write something to an external file?
  24. Replies
    7
    Views
    24,471

    fprintf and printf ?

    what's the difference between fprintf & printf ?
    if we read directly from a file, can we use printf to write the content?
  25. Replies
    4
    Views
    53,326

    thank you everyone! it's all clear now :)

    thank you everyone!
    it's all clear now :)
Results 1 to 25 of 30
Page 1 of 2 1 2