Search:

Type: Posts; User: sunburnt

Page 1 of 13 1 2 3 4

Search: Search took 21.43 seconds.

  1. Replies
    1
    Views
    583

    Re: client server C program

    I only can see two things (potentially) wrong:

    First, I would pass IPPROTO_TCP as the third argument to socket. It may very well be equal to 0, but it might also not :)

    Secondly, read/write...
  2. Thread: Huge Integers

    by sunburnt
    Replies
    8
    Views
    764

    Re: Huge Integers

    An unsigned 32 bit integer can represent numbers just over 4 billion (4294967295).
    An unsigned 64 bit integer can represent numbers just over 1.8 * 10^19 (18446744073709551615)

    Anyway, if you...
  3. Replies
    4
    Views
    1,559

    Re: Hostname from DNS

    You can set the hostname to whatever you want it to be. Either set it during the install, or:

    1. use the 'hostname' command followed by the new hostname
    2. change the value stored in the file...
  4. Replies
    5
    Views
    881

    Re: Adding an event to a button

    TEXT is a macro that makes it easy to compile your program both with Unicode strings and without.

    with the standard Windows API, you don't really register a click event for your button -- you...
  5. Replies
    4
    Views
    2,755

    Re: Perl script - monitoring a directory

    This sounds like a perfect use case for rsync.

    rsync will synchronize the contents of two directories (possibly on different machines), copying only what has changed between the two.

    basically,...
  6. Re: what the hell is wrong with my compiler or pc or me!! [c]

    The "L" added to the front of a string literal means that the compiler should expand it to a unicode string (char->2 bytes) instead of an regular string (char->1 byte). Apparently your IDE/compiler...
  7. Replies
    10
    Views
    2,379

    Re: Linux help please..

    You can press control+alt+f1 to switch to a terminal, but if the X session is completely frozen, that probably wont work. The version of linux I use includes a 'recovery' option at the GRUB boot...
  8. Replies
    10
    Views
    2,379

    Re: Linux help please..

    A completely white screen probably means that you have some conflicting X modules loaded or a X configuration that doesn't play nice with desktop effects. These can be tweaked in your xorg.conf...
  9. Replies
    10
    Views
    2,379

    Re: Linux help please..

    Yup -- sorry, the $ is usually what you'll see at the end of your prompt, so I threw it in there to indicate that you should type it at the terminal.

    For example, here at work my terminal looks...
  10. Replies
    10
    Views
    2,379

    Re: Linux help please..

    I'm not sure how fedora works, but usually during install you are also prompted to create a non-root username and account. Logging in as root, especially in a graphical session, is a very bad idea...
  11. Re: Diffence between .hpp and .h files

    A minor difference is that a .h file can be either a C header file or a C++ header file. Naming a header file .hpp is done to indicate that it's a C++ header file.
  12. Replies
    3
    Views
    782

    Re: using VB6 DLL in VC++ project

    Unfortunately it's going to be a lot harder than that. DLLs created with VB6 are (I believe) ActiveX DLLs. Using ActiveX objects from C++ is a rather complicated mess of COM interfaces and code...
  13. Replies
    2
    Views
    1,598

    Re: broken man pages

    You might check the $TERM environmental variable, which specifies the terminal type and from that what options (such as colors, formatting, etc.) are supported.

    Under gnome terminal, my $TERM is...
  14. Replies
    11
    Views
    1,007

    Re: [RESOLVED] Replace function [c]

    char* _replace(char* source_str,char* search_str,char* replace_str)
    {
    char ostr[1000000] = {0};// in my case the data are huge
    // ...
    return ostr;
    }



    This is not going to work...
  15. Thread: C

    by sunburnt
    Replies
    3
    Views
    569

    Re: C

    And you can use the same API in C/C++. At lot of people seem to be under the impression -- incorrectly -- that these "APIs" are a mystic VB thing. Access to the Windows API is available in any...
  16. Thread: c++ & Linux

    by sunburnt
    Replies
    3
    Views
    1,678

    Re: c++ & Linux

    There are lots of GUI toolkits for linux. The two most popular are GTK and QT. QT is free for use in open source applications, so don't let the "evaluation" button fool you.

    There is also a C++...
  17. Re: [SERIOUS] Using TradeMarks in "OpenSource" projects

    As far as I know (and I am not a lawyer), there's no difference between including a Microsoft logo in an open source project and in a close source commercial product.

    In both cases, you must...
  18. Thread: gmp_mod()

    by sunburnt
    Replies
    16
    Views
    1,414

    Re: gmp_mod()

    It might be good to check if your version of php was built with GMP support.

    Create a page to check:


    phpinfo();


    Visit this page -- do you see a section like this:
  19. Replies
    2
    Views
    1,293

    Re: hwnd Undeclared?

    do you have the line:



    HWND hwnd;


    somewhere in your code?
  20. Replies
    92
    Views
    4,327

    Re: TCPing - My legacy to IT

    I didn't look at the date of the post when I deleted the attachments. What I saw was a zip file containing just an executable with no source code. It didn't help that your account has just two...
  21. Replies
    2
    Views
    557

    Re: NooB C question, (char*)

    What you said is pretty much correct.

    In C/C++, a 'char' represents a single character. C has no built-in string type, so a string is represented as an array of characters terminated by a null...
  22. Replies
    2
    Views
    528

    Re: when to use ^ and when not to

    Anytime you create an object with 'gcnew' as opposed to 'new' or simply declaring it, you should use the 'hat'. the 'hat' indicates that the object is a reference and that is a reference to a...
  23. Replies
    92
    Views
    4,327

    Re: TCPing - My legacy to IT

    I've removed your attachments. If you want to post your work along with the source code so that people can inspect it and compile it themselves, that's fine, but we generally don't allow people to...
  24. Thread: unmanaged c++

    by sunburnt
    Replies
    1
    Views
    520

    Re: unmanaged c++

    I think the simple answer is that it's not possible without rewriting a lot of code and writing a lot of new code.

    Creating a GUI without the .NET framework in C++ is not an easy task -- there are...
  25. Replies
    11
    Views
    1,152

    Re: Compile problem, Iam new to C++

    The problem is that you haven't included the direct x libraries to link to. If you haven't downloaded those libraries already, you'll need to download them.

    I'm not sure what exact libraries you...
  26. Re: Use of calculated values from different functions inside another function.

    Woss pretty much nailed it.

    The only thing I would add is that if you're using C++, you can use references instead of pointers (and the typedef for the struct is not necessary).



    void...
  27. Replies
    12
    Views
    2,787

    Re: Installing Ubuntu

    This is at bootup after you installed the system, or while booting the live cd? The DHCP timeout shouldn't be more than a minute and a half.

    When it hangs, press CTRL+ALT+F1, CTRL+ALT+F2 ,...
  28. Replies
    1
    Views
    441

    Re: [Visual C++ 08], lot's of questions -.-

    Question 2: why do I have to do -> on objects (labels, timers), . on variables, and :: on some other things, to activate intellisense, I can not stand it!!!
    most of the time intellisense does not...
  29. Replies
    4
    Views
    645

    Re: Dynamic buffer allocation

    Is this what you are looking for?



    for (;;) {
    unsigned int str_len = 0 ;
    srf_ReadFile.Read((char*)&str_len, 4) ;

    char* buffer = new char[str_len];
    srf_ReadFile.Read(buffer,...
  30. Replies
    4
    Views
    645

    Re: Dynamic buffer allocation

    int* buffer = NULL;

    for(int i = 0; i < num_loops; i++)
    {
    // allocate buffer
    int size = size_for_next_buffer();
    buffer = new int[size];
    // copy data into buffer, process...
  31. Thread: c++ Compiler

    by sunburnt
    Replies
    12
    Views
    704

    Re: c++ Compiler

    I don't think you are going to be able to find a 'stand alone' compiler that isn't a command line program. That's just how compilers and linkers generally work.
  32. Replies
    5
    Views
    578

    Re: Problems with "NOT (~)"

    I'm not sure :)

    If you're interested you can read more on wikipedia: two's complement
  33. Replies
    5
    Views
    578

    Re: Problems with "NOT (~)"

    Actually, it worked perfectly, but the problem is the way that negative numbers are represented in the twos complement system.

    What you have discovered is this:

    A value is considered negative...
  34. Replies
    9
    Views
    710

    Re: CString and String

    There's no memory leak in that code.

    What your friend might mean is that the std::string class is immutable -- in other words, every time you make a change to a string via substr(), remove(), etc,...
  35. Re: I nedd explain????????

    WORD version


    WORD is a type defined in windows.h. It's an unsigned 16-bit integer, I think.



    WSADATA wsaData;
    WSAStartup(version,(LPWSADATA)&wsaData);
  36. Replies
    16
    Views
    1,144

    Re: this window genuine is getting me pissed

    Licensing and activation is very tricky to get right. You want to prevent piracy without affecting the legitimate users. It seems that lately a lot of companies have managed to get this completely...
  37. Replies
    1
    Views
    504

    Re: question re: system() command

    In C/C++, the backslash character in a string is an escape character -- it tells the preprocessor that you are trying to specify a special character. For example, \t means tab, \n means new line,...
  38. Thread: Ai

    by sunburnt
    Replies
    2
    Views
    731

    Re: Ai

    Because the problem space is not very large for a tic tac toe game, a simple solution is to recursively play out the game based on any possible moves, then pick the initial move that had ended up...
  39. Replies
    5
    Views
    1,983

    Re: modifying a file with fopen(filename, "r+")

    The problem is that while you can append text to an existing file, you can't "insert" text -- only overwrite.

    Your solution is correct -- read the file in, insert what you need, and then re-write...
  40. Replies
    10
    Views
    637

    Re: Managed and Unmanaged coding in C++

    Here's what I mean:
    C# and VB.NET are languages that Microsoft designed specifically to make use of the .NET Framework. C++ is a standardized language that has been around for quite a long time. ...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width