Search:

Type: Posts; User: Shiro

Page 1 of 20 1 2 3 4

Search: Search took 0.06 seconds.

  1. Replies
    9
    Views
    2,697

    If you define functions in foo.c and want to use...

    If you define functions in foo.c and want to use them in other source files, you declare them in a header file, which can be included by the other source files. The compiler needs that declaration...
  2. Replies
    8
    Views
    2,869

    This site might be interesting:...

    This site might be interesting:
    http://www.beyondlogic.org/
  3. Replies
    20
    Views
    4,846

    I'm not sure if I understand your problem well,...

    I'm not sure if I understand your problem well, but you can mix C and C++ code. In short you compile your C code with the C compiler and C++ code with the C++ compiler. By supplying linkage...
  4. Replies
    5
    Views
    4,924

    Looking at your current skills, I think you would...

    Looking at your current skills, I think you would find C programming itself quite low level. So perhaps you could study the C language a bit more and later decide on which direction you would like to...
  5. Replies
    5
    Views
    4,924

    What kind of software would you like to create? ...

    What kind of software would you like to create?

    If you want to play with datacommunication, there's a lot of information here:
    http://www.beyondlogic.org/

    Andrew Tanenbaum wrote some nice...
  6. Replies
    9
    Views
    33,168

    A different approach would be using fgets(),...

    A different approach would be using fgets(), which is more safe than gets().
  7. Replies
    20
    Views
    4,846

    I don't know of such a library, but if you need...

    I don't know of such a library, but if you need to implement an object orientated design in C, then there are different strategies for this. Some links that might be useful:
    ...
  8. Replies
    11
    Views
    2,255

    In both C and C++ the return statement terminates...

    In both C and C++ the return statement terminates the function. Check your compiler warnings, it will probably complain about the printf() never being executed.



    If the function was directly...
  9. Thread: IF - problem

    by Shiro
    Replies
    12
    Views
    1,331

    Also, you did'n initialise the variabels y and n....

    Also, you did'n initialise the variabels y and n. I assume you want y to be 'y' and n to be 'n', so initialise like this:

    y = 'y';
    n = 'n';
  10. Replies
    15
    Views
    4,064

    Also note that footwo.foofoo[4] is a single...

    Also note that footwo.foofoo[4] is a single character, not a string. Here is an example of how to use strcpy():
    http://www.cplusplus.com/ref/cstring/strcpy.html
  11. Thread: Imaging prg

    by Shiro
    Replies
    4
    Views
    1,259

    Here you will find some descriptions of graphic...

    Here you will find some descriptions of graphic file formats.
    http://www.dcs.ed.ac.uk/home/mxr/gfx/

    There is some example code included with the descriptions.
  12. Thread: Concatenation ?

    by Shiro
    Replies
    8
    Views
    1,969

    BTW, here's a useful online reference....

    BTW, here's a useful online reference.
    http://www.cppreference.com/
  13. Thread: Concatenation ?

    by Shiro
    Replies
    8
    Views
    1,969

    You should use strcpy() like this: strcpy...

    You should use strcpy() like this:

    strcpy (result, src1);

    The function returns result.
  14. Thread: Factorial

    by Shiro
    Replies
    10
    Views
    2,893

    With this line of code int factorial; you...

    With this line of code

    int factorial;

    you declare a variable of type int. This variable can contain some value. In your program, this line of code

    printf("\nThe factorial is %d", factorial);...
  15. Thread: argc & argv

    by Shiro
    Replies
    11
    Views
    6,817

    I'm not sure what your problem is. In argv...

    I'm not sure what your problem is. In argv strings are stored. If you want to convert the strings to numbers, you can use the function atoi(), which is in stdlib.h. If you want to use the numbers as...
  16. Replies
    11
    Views
    4,470

    If I am correct then C# requires the .NET...

    If I am correct then C# requires the .NET environment, for C and C++ such an environment is not necessary. Personally I don't think there is a "better", but since object orientation is very populair...
  17. Replies
    5
    Views
    1,905

    Well, actually it is from the designers of C....

    Well, actually it is from the designers of C. Here's a site about the book, it also contains links to the designers their sites, which contain a.o. interresting info on the history of C:...
  18. Replies
    4
    Views
    1,856

    You could try for example Google to search for...

    You could try for example Google to search for "sorting algorithms". It would lead you to sites like this: http://www.concentric.net/~ttwang/sort/sort.htm
  19. Replies
    5
    Views
    3,325

    The protection means that code cannot change the...

    The protection means that code cannot change the value of variable p directly by assigning a value to it. However, if you write data beyond the bound of an array or at some other place which you...
  20. Replies
    4
    Views
    1,069

    A C struct is not really an object. An object is...

    A C struct is not really an object. An object is an instance of a class and a class is an abstract datastructure. Abstract datastructures consist of data and functions operating on it.

    You can do...
  21. You can use a macro for calculating the factorial...

    You can use a macro for calculating the factorial of n like this:



    #define FAC(n) \
    for (f = 1, i = 2; i <= n; i++) \
    { \
    f *= i; \
    }
  22. Thread: Ideas?

    by Shiro
    Replies
    5
    Views
    1,144

    Since you know the basics of C programming, you...

    Since you know the basics of C programming, you could go a step higher and get a book on algorithms and datastructures (or read about it on the internet) and do the excercises it contains. This would...
  23. You can solve the problem by removing the...

    You can solve the problem by removing the recursion and using a while-loop or such instead.

    Shiro
  24. Replies
    6
    Views
    1,169

    A language is just a tool to solve some problem,...

    A language is just a tool to solve some problem, a good programmer uses the tools which fit best to solve the problem.


    Hmmm. You're asking a lot of questions of the same kind. :)
    ...
  25. Thread: OOP in C

    by Shiro
    Replies
    4
    Views
    5,392

    Interfaces are defined in a header-file. Assume...

    Interfaces are defined in a header-file. Assume there is a class called Class_A and there is a class called Class_B. Then we could define the interfaces to these classes in header files and implement...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4