Search:

Type: Posts; User: Nwb

Page 1 of 9 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    363

    thanks salem.

    thanks salem.
  2. Replies
    4
    Views
    363

    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?
  3. Replies
    4
    Views
    363

    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...
  4. Replies
    13
    Views
    737

    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.
  5. Replies
    13
    Views
    737

    One more question. void destroy_queue (...

    One more question.



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

    while ( q->head )
    {
  6. Replies
    13
    Views
    737

    Ok, thanks Fred and Malcolm. :D

    Ok, thanks Fred and Malcolm. :D
  7. Replies
    13
    Views
    737

    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.
  8. Replies
    13
    Views
    737

    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...
  9. Replies
    5
    Views
    376

    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.
  10. Replies
    13
    Views
    737

    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...
  11. Replies
    5
    Views
    376

    Wow that is complicated.. thanks

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

    Thank Salem, hamster_nz and laser light.
  13. 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...
  14. Replies
    5
    Views
    376

    How is tolower() implemented if..

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

    Lag does Lag

    Lag does Lag
  16. Replies
    17
    Views
    1,868

    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.
  17. Replies
    17
    Views
    1,868

    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...
  18. Replies
    17
    Views
    1,868

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

    How were you able to color your code in that way?
  19. Replies
    12
    Views
    1,619

    #include struct Foo { ...

    #include <iostream>

    struct Foo {

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

    int main() {
  20. Replies
    12
    Views
    1,619

    #include void print(bool) { ...

    #include <iostream>

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

    class Foo {
    public:

    operator bool() const {
  21. Replies
    12
    Views
    1,619

    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;
  22. Replies
    12
    Views
    1,619

    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...
  23. Replies
    12
    Views
    1,619

    Oh okay so something like int var = Foo(5); would...

    Oh okay so something like int var = Foo(5); would be an implicit conversion from Foo to int (if int opeartor is defined, and not explicit). Whereas inside a conditional is considered as explicit...
  24. Replies
    12
    Views
    1,619

    Why do we use the keyword 'explicit'? Also can we...

    Why do we use the keyword 'explicit'? Also can we define this operator for user-defined types too like 'explicit operator Matrix()' or is it just for primitive types?
    So when inside a conditional an...
  25. Replies
    12
    Views
    1,619

    How does std::cin return a bool value?

    How does std::cin return a bool value?
    For instance you can write
    if(std::cin) { ... } to check the fail state of std::cin. But how does that work, if std::cin is an object of istream?

    Also...
Results 1 to 25 of 215
Page 1 of 9 1 2 3 4