Search:

Type: Posts; User: Nwb

Page 1 of 9 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    338

    I understood, thanks

    I understood, thanks
  2. Replies
    4
    Views
    338

    I had just read about streams. I had read that...

    I had just read about streams. I had read that the stdin was line buffered in my compiler. So I thought the reason getchar() didn't immediately read the character was because of this line buffering....
  3. Replies
    4
    Views
    338

    getchar() with an unbuffered stdin

    #include <stdio.h>

    int main() {

    setvbuf(stdin, NULL, _IONBF, 0);

    int input;
    input = getchar();

    printf("\n%c", input);
  4. Replies
    4
    Views
    813

    thanks salem.

    thanks salem.
  5. Replies
    4
    Views
    813

    But won't different processors have different...

    But won't different processors have different instruction set? How does the assembler figure out what the instruction set of the processor is?
  6. Replies
    4
    Views
    813

    C programs into machine code

    How do C compilers convert C source code into machine code? Does the C compiler convert its code into assembly language and then automatically find and use the assembler for that particular processor...
  7. Replies
    13
    Views
    1,070

    ok, thanks for replying Fred. @thmm thanks for...

    ok, thanks for replying Fred.

    @thmm thanks for replying, yeah, looks like linked nodes are the way to go.
  8. Replies
    13
    Views
    1,070

    One more question. void destroy_queue (...

    One more question.



    void destroy_queue ( QUEUE *q, void ( *dtor ) ( void * ) )
    {
    NODE *n;

    while ( q->head )
    {
  9. Replies
    13
    Views
    1,070

    Ok, thanks Fred and Malcolm. :D

    Ok, thanks Fred and Malcolm. :D
  10. Replies
    13
    Views
    1,070

    Thanks Malcolm. " It can't send a message to...

    Thanks Malcolm.

    " It can't send a message to stderr because that might not make sense in the context of the program."
    I didn't understand this sentence.
  11. Replies
    13
    Views
    1,070

    Thanks a lot for replying flp1969! Wow. It's...

    Thanks a lot for replying flp1969!
    Wow. It's really amazing. I never knew you could do stuff like that (the polymorphism). That's a really neat hack, thanks a lot.

    Took me some time to...
  12. Replies
    5
    Views
    527

    Thanks a lot Malcolm McLean and john.c! So it's...

    Thanks a lot Malcolm McLean and john.c! So it's better to use the standard library whenever possible huh?
    my 200th post. yey.
  13. Replies
    13
    Views
    1,070

    Need Tips - My Queue Implementation

    I've implemented a Queue Data Structure which stores struct Coordinate data elements.

    struct Queue is the structure which stores the queue.
    -> It has a size to represent the queue's size
    (is it...
  14. Replies
    5
    Views
    527

    Wow that is complicated.. thanks

    Wow that is complicated.. thanks
  15. Thank Salem, hamster_nz and laser light.

    Thank Salem, hamster_nz and laser light.
  16. modifying string literal, identifying whether char* points to malloced

    char* my_string = "oello world";
    my_string[0] = 'h';

    printf("%s", my_string);


    This snippet gives me a "Segmentation fault" in onlinegdb.com's C compiler. Why does it give a...
  17. Replies
    5
    Views
    527

    How is tolower() implemented if..

    How is tolower() implemented by the standard library if alphabets are not guaranteed to be continuous?
  18. Replies
    17
    Views
    2,753

    Lag does Lag

    Lag does Lag
  19. Replies
    17
    Views
    2,753

    Yes I saw that the text is formatted. But how...

    Yes I saw that the text is formatted. But how does he copy the formatting as well?
    I use Visual Studio too.
  20. Replies
    17
    Views
    2,753

    Can you copy from Visual Studio with the color...

    Can you copy from Visual Studio with the color though? I thought you could only copy text. How might OP have done that? Weird..?

    Tim I'm referring to OP's original topic post, do you notice that...
  21. Replies
    17
    Views
    2,753

    How were you able to color your code in that way?

    How were you able to color your code in that way?
  22. Replies
    12
    Views
    2,534

    #include struct Foo { ...

    #include <iostream>

    struct Foo {

    std::ostream& operator << (int) {
    return std::cout;
    }
    };

    int main() {
  23. Replies
    12
    Views
    2,534

    #include void print(bool) { ...

    #include <iostream>

    void print(bool) {
    std::cout << "called";
    }

    class Foo {
    public:

    operator bool() const {
  24. Replies
    12
    Views
    2,534

    Okay it gives me a compiling error, sorry my bad....

    Okay it gives me a compiling error, sorry my bad.

    Back to this:

    Foo var;
    int val{ var };
    Suppose we have an operator

    operator bool() const {
    return true;
  25. Replies
    12
    Views
    2,534

    Here: Foo var; bool val{ var }; The...

    Here:

    Foo var;
    bool val{ var };
    The compiler will convert var to type bool implicitly. But the compiler is only supposed to look for implicit conversions when '=' is used right.. so only...
Results 1 to 25 of 218
Page 1 of 9 1 2 3 4