Search:

Type: Posts; User: Yasir_Malik

Page 1 of 9 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    12
    Views
    2,053

    I was thinking about doing this many times: ...

    I was thinking about doing this many times:


    void func(void)
    {
    char *s = "hello";
    }


    If the compiler allocated memory for s in the data segment. Eventually there would be "hello"s...
  2. Replies
    12
    Views
    2,053

    I see now. It goes back to how char s[] is a...

    I see now. It goes back to how char s[] is a constant pointer while char *p is just a pointer. Since it can point to anything, it would pointless to have the string "something" floating around;...
  3. Replies
    12
    Views
    2,053

    But why does assigning to an index in char str[]...

    But why does assigning to an index in char str[] work? Is there something special about char *str that puts the string into the text memory, not into data memory?
  4. Replies
    12
    Views
    2,053

    Why does this code fail?

    This fails:


    char *s = "hello";
    s[0] = 'H';


    but this doesn't:
  5. Replies
    1
    Views
    3,144

    http://www.amazon.com/Internet-Programming-Book-Di...

    http://www.amazon.com/Internet-Programming-Book-Disk-Jamsa/dp/1884133126 is pretty good. Although it's old, TCP/IP V4 hasn't changed in a while anyway. Or you could look at Beej's network...
  6. Replies
    18
    Views
    7,184

    Perhaps for each function you call you could save...

    Perhaps for each function you call you could save the function name and arguments inside a global linked list, and then whenever you need to, print out out the contents of the linked list. Each time...
  7. You can run C# programs on Unix. Check out...

    You can run C# programs on Unix. Check out http://www.mono-project.com/Main_Page. I haven't tried it, though.
  8. Replies
    18
    Views
    7,184

    Maybe I don't understand what you're trying to...

    Maybe I don't understand what you're trying to do, but can't you just print the name of the function as you go along?
  9. Replies
    6
    Views
    1,324

    Windows compresses some files, and they are not...

    Windows compresses some files, and they are not straight forward to delete like that.
  10. Replies
    8
    Views
    4,084

    I want to add that I only get those warnings,...

    I want to add that I only get those warnings, where as before, I was getting a sargasso of repeated warnings.
  11. Replies
    8
    Views
    4,084

    Thanks, that worked. However, when I try to add...

    Thanks, that worked.
    However, when I try to add elements to a map, I get the following warnings:


    c:\program files\microsoft visual studio\vc98\include\utility(23) : warning C4786:...
  12. Replies
    8
    Views
    4,084

    Thanks for the fast response. That doesn't seem...

    Thanks for the fast response.
    That doesn't seem to work. I still get the C4786 warnings. Is there something else I need to have?
  13. Replies
    8
    Views
    4,084

    maps in Visual Studio 6.0

    Hello,

    I want to use maps in Visual Studio 6.0. However, declaring


    map<char *, int> asdf;

    Gives many warnings:
  14. Replies
    17
    Views
    6,088

    Nintendo of America only hires Digipen graduates...

    Nintendo of America only hires Digipen graduates (Nintendo helped create Digipen). After working at Nintendo, you could probably get a job anywhere else.
  15. Replies
    8
    Views
    8,389

    The following man page on dup2(), I think, has...

    The following man page on dup2(), I think, has the clearest description of dup2: http://docsun.cites.uiuc.edu/sun_docs/C/solaris_9/SUNWaman/hman3c/dup2.3c.html

    Each process has a file descriptor...
  16. Replies
    7
    Views
    7,894

    I assume that PI can be calculated using a...

    I assume that PI can be calculated using a series, so that program must iterate repeatedly using the series formula. Of course, that's not the exact value of PI, but the more iterations you do, the...
  17. You're not including the null nodes, and you have...

    You're not including the null nodes, and you have to do it twice for the nodes with no children. Here's a better link:
    http://planetmath.org/encyclopedia/ExternalPathLength.html
  18. I calculated the internal path length as 10. So...

    I calculated the internal path length as 10. So 7*2 + 10 = 24.
  19. Shouldn't you expect 24? Perhaps I'm...

    Shouldn't you expect 24? Perhaps I'm interpreting this problem incorrectly.
  20. Are you familiar with depth first search? This...

    Are you familiar with depth first search? This is an application of the algorithm.
  21. Replies
    3
    Views
    1,167

    PHP is usually used for this kind of stuff, but I...

    PHP is usually used for this kind of stuff, but I assume that your C code will receive the HTTP POST data from standard input. You may even have to parse the POST data, which is of the form...
  22. You can surely do this using ncurses, but this...

    You can surely do this using ncurses, but this may require rewriting some of your code. PDCurses can be used on Windows, and it provides identical functionality as ncurses (look at the demos for...
  23. Replies
    9
    Views
    2,515

    puts() appends a newline.

    puts() appends a newline.
  24. Replies
    3
    Views
    1,343

    I thought about that too. However, if you run...

    I thought about that too. However, if you run wc, you'll notice that it waits for input, so synchronization is done. For example:


    #include <unistd.h>

    int main()
    {
    int fds[2];
    int pid;
  25. Replies
    18
    Views
    2,380

    I've tried ANDing with 1 and Solaris running on...

    I've tried ANDing with 1 and Solaris running on SPARC and NetBSD running on i386, and both work indentically.
Results 1 to 25 of 224
Page 1 of 9 1 2 3 4