-
September 10th, 2013, 01:41 PM
#25
Re: how can i convert write() procedure to cout?
Originally Posted by Cambalinho
(the error stills be when i use these function)?
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?
Code:
#include <iostream>
using namespace std;
int main()
{
char *p = "Hello World";
cout << p;
}
Code:
Output:
Hello World
So what are you trying to achieve? The streams are overloaded already for char*, and if <string> is included, for std::string and std::wstring.
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|