Search:

Type: Posts; User: James00

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    4,769

    Help understanding arrays and pointers

    I am learning C from a book, and I don't seem to understand fully the following paragraphs about arrays and pointers:


    Although many similarities exist between pointers and arrays, they have one...
  2. Replies
    10
    Views
    1,373

    Glad that I could help you out 4play!!! :D ...

    Glad that I could help you out 4play!!! :D Anyway, I really recommend that you visit here often, and ask for help here when needed, it really is a great forum with lots of guys with a lot of...
  3. Replies
    10
    Views
    1,373

    Try this out: #include #include...

    Try this out:


    #include <stdio.h>
    #include <conio.h>
    #include <string.h>
    #include <stdlib.h>
    #include <ctype.h> //you need this for the tolower function

    int main () //start with...
  4. Replies
    30
    Views
    4,978

    First of all, good to see that you know more than...

    First of all, good to see that you know more than I thought, now I can explain things to you much easier! Now, let me put it this way, you only declare the number of characters (as in char name[20];...
  5. Replies
    30
    Views
    4,978

    Ok I will post a simple program where you declare...

    Ok I will post a simple program where you declare a char variable and the user types his name (his name becomes the variable). Here it is (type in your editor and post it):


    #include <stdio.h>
    ...
  6. Replies
    30
    Views
    4,978

    You could use both methods you have described...

    You could use both methods you have described above, but there is also another way (actually, many more, but to advanced right now) to give a value to a char variable, and I explained it in my last...
  7. Replies
    30
    Views
    4,978

    Glad to hear that I was able to help you out! :D ...

    Glad to hear that I was able to help you out! :D Anyway, I'll try and explain each question you have as easy as I possibly can.



    As quzah said it should be able to work. What I think happened...
  8. Replies
    30
    Views
    4,978

    Yeah, but he still he understood everything...

    Yeah, but he still he understood everything differently, judging by his posts, he thinks that a char is a way to put a number in program by using a 'letter' (example: a) to specify a certain number,...
  9. Replies
    30
    Views
    4,978

    Yeah I understand what you mean, but let me...

    Yeah I understand what you mean, but let me explain. I have only started learning C a couple of months ago (in a sense I am also a beginner), and that is how I learned about the char variable, and I...
  10. Replies
    30
    Views
    4,978

    I think that Tride wants you to explain it in...

    I think that Tride wants you to explain it in simpler terms, he is a beginner after all, and frankly, I think your answers are too complicated for him (you are using loops and arrays, and he still...
  11. Thread: switch

    by James00
    Replies
    4
    Views
    954

    As XSquared said you need to put break; at the...

    As XSquared said you need to put break; at the end of 'case 1' in order to prevent the 'default' statement to run if 'case 1' is correct. If you don't put it, then if 'case 1' is correct, also the...
  12. Replies
    3
    Views
    1,981

    You could use the strlen function (remember to...

    You could use the strlen function (remember to put the string.h header file) to read the number of characters. Example:


    #include <stdio.h>
    #include <string.h>

    int main()
    {
    char...
  13. Replies
    9
    Views
    5,282

    I have looked at the help files but I can't...

    I have looked at the help files but I can't really find what I am looking. What I do is this: I open the only possible folder in the help menu, Command Line Tools. Then I get all these C++ Builder...
  14. Replies
    9
    Views
    5,282

    Well, I have tried a lot of things and none work,...

    Well, I have tried a lot of things and none work, but then I noticed that my compiler compiled by deafult in 32 bit, and my programs only runs in 16 bit. How do I make my compiler compile in 16 bit?...
  15. Replies
    9
    Views
    5,282

    Thanks for all the help!!! I actually save my...

    Thanks for all the help!!! I actually save my source code with the .c at the end instead of .cpp. And thanks for the comments about void main(), I will use int from now on. I think I will have to get...
  16. Replies
    9
    Views
    5,282

    Creepy DOS and BIOS functions (need help!!!)

    I use Borland C++ Compiler 5.5,which runs in DOS, I just put bcc32 and the source code (the .cpp file that has source code) and it compiles it. Well I am having the following problem while trying to...
  17. Replies
    4
    Views
    5,464

    Thanks a lot!!! Hammer, your guide is awesome, I...

    Thanks a lot!!! Hammer, your guide is awesome, I now know exactly what each function is. A million thanks!!! :D
  18. Replies
    4
    Views
    5,464

    Difference between using atoi and scanf

    I have a question, whats the difference between (1) using atoi to convert a 'char number' (number used in a char variable) into a int variable , (2) and just using scanf to read the int directly...
  19. Replies
    9
    Views
    943

    Thanks!!! Anyway, why don't I need the 'atoi'...

    Thanks!!! Anyway, why don't I need the 'atoi' statement? I have a 'char' and I want to convert it to a 'int'. Could you please explain why I don't need the 'atoi' in this program. Thanks.
  20. Replies
    9
    Views
    943

    C program error (need help!)

    I have started learning C a couple of weeks ago, but I have the following question. Any 'char' variables can hold string values and numeric valued from -128 to 127. If it is unsigned it can hold...
Results 1 to 20 of 20