User Profile

Collapse

Profile Sidebar

Collapse
Adam01
Adam01
Last Activity: Aug 13 '13, 01:11 AM
Joined: Aug 8 '08
Location: South essex, England
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Adam01
    replied to how to print a multiple characters?
    in C
    Your storing 2 characters in one place.
    Where as ' ' can only hold one character.

    A quick fix would be to define grade as
    char grade[2];

    Then use grade[0] = 'A' for single grade letters, and then
    grade[0] = 'A';
    grade[1] = '+';
    See more | Go to post

    Leave a comment:


  • Adam01
    replied to Cygwin sockets: getaddrinfo undeclared
    in C
    Ok I found out that _WIN32 is defined in cygwin.
    And #undef _WIN32 doesnt work >(
    Ideas?

    Actually I'l use virtualbox.
    See more | Go to post

    Leave a comment:


  • Adam01
    replied to Cygwin sockets: getaddrinfo undeclared
    in C
    Ok, I used valgrind to track down the memory errors.

    Turns out that gethostbyname(" ") returned null on centos and I did check it before using it.

    I still cant compile this on cygwin.
    See more | Go to post

    Leave a comment:


  • Adam01
    replied to Cygwin sockets: getaddrinfo undeclared
    in C
    Ok delete this thread, I worked it out.
    See more | Go to post

    Leave a comment:


  • Adam01
    replied to Cygwin sockets: getaddrinfo undeclared
    in C
    Sorry I couldnt edit the post above, but compiling on centOS, compiles and links fine. But running, the only output I get is:
    Segmentation fault

    No warnings/ouput popped up whilst g++ was compiling/linking.
    See more | Go to post

    Leave a comment:


  • Adam01
    replied to Cygwin sockets: getaddrinfo undeclared
    in C
    Ok turned out I needed to use the -mno-cygwin option for g++.
    But help the on the object file directory would be nice.

    Edit: Now I seem to be undefined linking errors:

    Code:
    memoryhandler.o:memoryhandler.cpp:(.text+0xc1c): undefined reference to `_GetPro
    cessMemoryInfo@12'
    errorhandler.o:errorhandler.cpp:(.text+0xf70): undefined reference to `_WSAGetLa
    stError@0'
    errorhandler.o:errorhandler.cpp:(.text+0x1840):
    ...
    See more | Go to post

    Leave a comment:


  • Adam01
    replied to hidden folders are not being displayed
    In explorer, tools->folder options->view:
    Is "show hidden files and folders" selected

    And if you are looking in system directories:
    Is "Hide protected operating system files" unchecked.
    See more | Go to post

    Leave a comment:


  • Adam01
    started a topic Cygwin sockets: getaddrinfo undeclared
    in C

    Cygwin sockets: getaddrinfo undeclared

    Im using cygwin to test the code of a server I am writing.
    I've included sys/types.h, sys/socket.h, netdb.h, and arpa/inet.h.

    And this is the output..
    Code:
    ../../../sockets.cpp: In constructor `network_class::network_class()':
    ../../../sockets.cpp:64: error: aggregate `addrinfo hints' has incomplete type a
    nd cannot be defined
    ../../../sockets.cpp:69: error: `getaddrinfo' undeclared (first use
    ...
    See more | Go to post

  • Adam01
    started a topic Install vista sp1 (After previous install failed)

    Install vista sp1 (After previous install failed)

    Hi all,
    The last time I installed windows vista (home premium) sp1 from windows updates, it failed to install after boot, and kept failing on each boot. So I re-installed via the system recovery option at POST (PC has a seperate partition with windows backup files)

    So its been a month sinse then, most of the stuff is installed on this pc now.

    What is the chances of this happening again?
    I cant quite the...
    See more | Go to post

  • Adam01
    replied to IO::Compress::Gzip problem (CentOS)
    in Perl
    It turns out the perl script isnt built for activeperl, (only on win)
    So, Im back to the IO:Compress:Gzi p problem again.
    cpan, sais the module exists, but when I download the newer one, it fails to make it.
    See more | Go to post

    Leave a comment:


  • Adam01
    replied to IO::Compress::Gzip problem (CentOS)
    in Perl
    Aha I got it working, it required active perl.
    How do you replace the original perl with active perl?
    I added activeperl /bin/ to PATH, but it would conflict with the old perl?
    See more | Go to post

    Leave a comment:


  • Adam01
    replied to IO::Compress::Gzip problem (CentOS)
    in Perl
    CentOS vps, linux isnt my primary OS.
    I'l check the paths the script is using, and if Gzip actually exists.
    Where are the modules located?
    (locate doesnt work because of a missing db)
    See more | Go to post

    Leave a comment:


  • Adam01
    started a topic IO::Compress::Gzip problem (CentOS)
    in Perl

    IO::Compress::Gzip problem (CentOS)

    Im not perl expert with perl, and I am trying to run a server script (that I didnt write).
    And perl reports:
    Code:
    Can't locate IO/Compress/Gzip.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7
    ...
    See more | Go to post
    Last edited by numberwhun; Sep 11 '09, 05:27 AM. Reason: Please use code tags!

  • Adam01
    started a topic Why are global variables considered bad?
    in C

    Why are global variables considered bad?

    I was thinking of adding some global vars to my program when I stoped to think why they are considered harmful.
    I read on a google result that they can get mixed up with local variables, but that can be simply fixed with a prepended global_ or something on the lines of that.

    I remember reading somewhere about them causing security or memory leaks or something like that.

    Is that why? or is there more to it?
    See more | Go to post

  • Adam01
    replied to c++ Winsock problem
    in C
    Common, Im running out of excuses to bump.
    See more | Go to post

    Leave a comment:


  • Adam01
    replied to c++ Winsock problem
    in C
    Could their be anything else that causes the crash?
    See more | Go to post

    Leave a comment:


  • Adam01
    replied to c++ Winsock problem
    in C
    Ok, thanks for your help.
    But the client still freezes up, even on localhost.
    Could there be anything else, say if there was a problem with recv or something?
    See more | Go to post

    Leave a comment:


  • Adam01
    replied to c++ Winsock problem
    in C
    Ok, would this need to be set on the client as well?
    I applied the setting on the server, but I get the same result.
    I used this:
    setsockopt(List enSocket, SOL_SOCKET, SO_KEEPALIVE, (char*)&bOptVal , bOptLen)

    If I did need to set on the client, how can I apply this with sdl_net?
    See more | Go to post

    Leave a comment:


  • Adam01
    started a topic c++ Winsock problem
    in C

    c++ Winsock problem

    Hi,
    I've been getting this problem when after a certain ammount of sent messages to the server, the client would freeze up. And the only way to un-freeze the client would be to close the socket via the server.

    I'm making a server for a simple 2d game (which I didnt make) and it uses sdl_net.
    Before I post all the source code, does anyone reconise these sort of problems?
    See more | Go to post

  • george666
    george666 posted a Visitor Message for Adam01
    You can ask on specialized Win32 api newsgroup :
    news://comp.os.ms-windows.programmer.win32
    where it has often been discussed
    See more | Go to post
No activity results to display
Show More
Working...