Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Paul McKenzie

Search: Search took 1.49 seconds.

  1. Re: how can i convert write() procedure to cout?

    That is because the item on the left-hand side of the + is no longer a string-literal. It is now a std::string.

    Regards,

    Paul McKenzie
  2. Re: how can i convert write() procedure to cout?

    Also, if this is for your custom "language" that you say you are trying to write, then again, trying to get C++ to look like your custom language is not possible in these cases.

    The binary +...
  3. Re: how can i convert write() procedure to cout?

    Good luck, since no one else in the C++ world has done this.

    There is a reason why you cannot concatentate string literals -- it is because they are pointers. You cannot take two string literals...
  4. Re: how can i convert write() procedure to cout?

    What is the exact error?

    Second, the cout is overloaded to take a null-terminated char*. Why not write a simple program to show this?


    #include <iostream>

    using namespace std;

    int main()
  5. Re: how can i convert write() procedure to cout?

    That is a Windows API specific function, and this forum is geared towards standard C++, not Windows API functions. There is no "ReadConsole" function in standard C++.

    If you're asking about...
  6. Re: how can i convert write() procedure to cout?

    There is no standard C++ function that does this job. The _getch() function may or may not be supported by the compiler.

    Maybe you should go over what are the standard functions of C++ before...
  7. Re: how can i convert write() procedure to cout?

    The functions not only need to be overloaded, but they also need to be template functions.


    template <typename arg1>
    void write(arg1 a1)
    {
    //...
    }

    template <typename arg1, typename arg2>
  8. Re: how can i convert write() procedure to cout?

    It is powerful, but note that you can't find a function that does what you say you want it to do (at least not with C++ 98 or 03). Why do you think that is?

    Regards,

    Paul McKenzie
  9. Re: how can i convert write() procedure to cout?

    It has nothing to do with the tutorial. That is how C++ works.

    The receiving function has no idea where your argument list stops when you use a varying number of arguments. So you have to tell...
Results 1 to 9 of 9


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This a Codeguru.com survey!


On-Demand Webinars (sponsored)