I have found the solution. Sorry for every one I just pissed off.
I only had to use the c_str() methode of a string and I'am sure I did try it yesterday multiple times, but I gues I forgot the "()".
greetz
Spikey
User Profile
Collapse
-
Sorry to bother you, but I really NEED a char array like "char msg[]" instead of a string. The only reason I used a string was to add data to a text line, afterwards I really need to convert it to a char array.
The methode viWrite is a methode writen by National Instruments and I only can convert a char array to a ViBuf (see also code of post#1). ViBuf is defined as a char.
in the visatype.h (the source of National...Leave a comment:
-
Hi,
I have a few things working now, but I really need to have an array with the exact size of the string.
I was hoping the following code would do the trick, but it ain't
example:
it's essential that afterwards sizeof(ch1) is equal...Code:string s1 = "output1?"; // s1.size = 8 char ch1[s1.size()]; // this ain't gonne work, I know! strcpy (ch1 , s1.c_str());
Leave a comment:
-
Hi,
I guess it's not that easy... the strcpy I have to use (to convert the string to a char array) is creating a Warning. I can live with that but it's not pretty.
The real problem is that the sstream is creating an error in combination with my errorhandler.
ERROR: error C2362: initialization of 's2' is skipped by 'goto errorHandler'
GreetZ.Leave a comment:
-
Adding a string or int to a character array
Hi,
I have a problem that's (probably) very easy to solve, only I'am more a Java programmer and I couldn't find anything like it on the internet.
My problem is that I have to add a variable (int, string, double) to a character array. I know that it is very easy with Java but I din't find any thing for C/C++.
Everything I found created errors.
Example:
I've added the first 4 lines of the methode "setOffset( int...
No activity results to display
Show More
Leave a comment: