I have an EDIT box. I tried to put in a \n to skip a line, but it doesn't work. I get:
220 keyboard.cpp
passing `char' to argument 2 of `strcat(char *, const char *)' lacks a cast
This is a discussion on Using \n in an EDIT box(I have an error) within the Windows Programming forums, part of the Platform Specific Boards category; I have an EDIT box. I tried to put in a \n to skip a line, but it doesn't work. ...
I have an EDIT box. I tried to put in a \n to skip a line, but it doesn't work. I get:
220 keyboard.cpp
passing `char' to argument 2 of `strcat(char *, const char *)' lacks a cast
Website(s): http://www16.brinkster.com/trifaze/
E-mail: trifaze_mattu@lycos.com
---------------------------------
C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
DirectX Version: 9.0b
DX SDK: DirectX 8.1 SDK
I have the code:
strcat(getName, '\r\n');
and it says:
220 keyboard.cpp
passing `int' to argument 2 of `strcat(char *, const char *)' lacks a cast
and I tried:
strcat(getName, "\r\n");
and it doesn't do a new line.
Website(s): http://www16.brinkster.com/trifaze/
E-mail: trifaze_mattu@lycos.com
---------------------------------
C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
DirectX Version: 9.0b
DX SDK: DirectX 8.1 SDK
and I tried:
strcat(getName, "\r\n");
This should work. You'll have to post more code.
btw, what compiler are you using?
zen
I am using Mingw32 in Dev-C++
Website(s): http://www16.brinkster.com/trifaze/
E-mail: trifaze_mattu@lycos.com
---------------------------------
C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
DirectX Version: 9.0b
DX SDK: DirectX 8.1 SDK
I tried strcat(getName, "\r\n"); on Dev C++ and it inserted a newline on an Editbox, so the problem must be elsewhere in your code (is getName long enough to be appended).
zen
Are you sure you have a MultiLine edit?
Gays can't love like real people
entropysink.com -- because arses weren't designed for running websites.
I got a multiline now. I forgot it. But now, I have the message. Though, when I click the button a second time, it shows the message twice, third click,message 3 times, and so on. What do Ido to reset the contents ofthe char's whenthe button is clicked?
Website(s): http://www16.brinkster.com/trifaze/
E-mail: trifaze_mattu@lycos.com
---------------------------------
C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
DirectX Version: 9.0b
DX SDK: DirectX 8.1 SDK