Search:

Type: Posts; User: babaliaris

Search: Search took 0.01 seconds.

  1. Thank you for your reply! I understand what you...

    Thank you for your reply! I understand what you mean, lately I'm programming too much in c++ and i forgot that c is not initializing anything. About the code, yes I copied paste it from an Idle so...
  2. Char array in while scope does not do what I excpected.

    while ( fgets(line, 100, file) !=NULL )
    {
    char path[100];
    int i =1;

    strcat(path, cwd);
    strcat(path, "/");
    strcat(path, line);
    printf("path is: %s", path);
  3. Replies
    2
    Views
    548

    Thank you so much!!! This is perfect .I really...

    Thank you so much!!! This is perfect .I really couldn't find it with google.
  4. Replies
    2
    Views
    548

    C Macros Help.

    Hello!

    i have this macro:



    #define NBTEST(GroupName, TestName) int (GroupName)(TestName)()
  5. Replies
    9
    Views
    3,978

    I think i got it. SMengine.h #pragma once...

    I think i got it.

    SMengine.h


    #pragma once


    class SMengine
    {
  6. Replies
    9
    Views
    3,978

    Thank you, I'm on it right now!

    Thank you, I'm on it right now!
  7. Replies
    9
    Views
    3,978

    No reason actually, but it seems to be the...

    No reason actually, but it seems to be the problem :p
  8. Replies
    9
    Views
    3,978

    Well i tried it but i get a bunch of weird errors...

    Well i tried it but i get a bunch of weird errors when i compile it.

    SMengine.h


    #pragma once
  9. Replies
    9
    Views
    3,978

    Dynamic Library, Header Files Visibility.

    Hello!

    I'm creating a game engine using the SDL library and i stepped into a problem.

    Say i have this definition:

    SMengine.h


    #include <SDL.h>
  10. Replies
    7
    Views
    7,154

    Every time you accept a client, accept returns...

    Every time you accept a client, accept returns you a socket object which you can use to communicate with the client. After accepting a client, you should create a new thread to handle the...
  11. Replies
    4
    Views
    5,995

    I tried to use -ggdb both in the CFLAGS and in...

    I tried to use -ggdb both in the CFLAGS and in the LINKFLAGS and also i combined -g and -ggdb together but no luck, still the same :(
  12. Replies
    4
    Views
    5,995

    I tried it, the result is the same :( I also...

    I tried it, the result is the same :(

    I also tried to compile it in a single line like this:


    gcc <include paths> <link paths> -g -Wall -o main <source files> <shared_files>


    But i get the...
  13. Replies
    4
    Views
    5,995

    mingw32 GDB No line information problem.

    Hello!

    I have this make file:



    #===========================Basic Macros===========================#
    COMPILER = gcc
  14. Nice tip!!

    Nice tip!!
  15. I thought the new reference was a new memory...

    I thought the new reference was a new memory block. So i put that free there on purpose so you can tell me if its wrong :p
  16. What do you have to say about this ;) (i think is...

    What do you have to say about this ;) (i think is good):



    //Return's 1 for success, 0 otherwise.
    int CString_ToInt(int *dst, char *string){


    //Reference where the remaining string will...
  17. So i followed Salem's advice, and i created these...

    So i followed Salem's advice, and i created these function wrappers:



    //Return's 1 for success, 0 otherwise.
    int CString_ToInt(int *dst, char *string){


    *dst = atoi(string);
  18. Yes, I should probably not bother. Anyway i was...

    Yes, I should probably not bother. Anyway i was making this Library because i'm making a game in C and i need to play with strings. I guess strcpy, strcat, strlen, strcmp, sprintf, atoi, atof, will...
  19. You are more that right, I should use sprintf. ...

    You are more that right, I should use sprintf.



    #include <string.h>


    int main()
    {
    float num = 12.34;
  20. Yes you are right. There is not absolute value of...

    Yes you are right. There is not absolute value of INT_MIN since a signed int can't represent it. Math.h documentation says that abs(INT_MIN) result is undefined and u can't expect what you will get,...
  21. I don't like that either, but i wanted to avoid...

    I don't like that either, but i wanted to avoid arrays and sizes, i wanted to be more Java like :P not that i'm a java person, but this way is easier for the eye.
    Now about an error, you are right,...
  22. How efficient do you think is this Int To String Converter Function?

    Hello! I'm new to this forum!

    I'm creating a Dynamic C String Library and i'm not glad about a function i created (About Efficient), because it does so many allocations and deallocations based on...
Results 1 to 22 of 22