Related
Dan Brenner I'm trying to write a function that takes a const char *as a parameter, but I don't know how to pass such data to the function in a useful way. If I have the function: void tokenize(const char * c) { }
I want to call this function with a hardcoded
Dan Brenner I'm trying to write a function that takes a const char *as a parameter, but I don't know how to pass such data to the function in a useful way. If I have the function: void tokenize(const char * c) { }
I want to call this function with a hardcoded
scientific I try to call a pure C function from an external DLL in a C# application. This function is defined as void set_param(const char *data)
Now I have some problems using this function: How can I specify this "const" in C# code? public static extern voi
scientific I try to call a pure C function from an external DLL in a C# application. This function is defined as void set_param(const char *data)
Now I have some problems using this function: How can I specify this "const" in C# code? public static extern voi
scientific I try to call a pure C function from an external DLL in a C# application. This function is defined as void set_param(const char *data)
Now I have some problems using this function: How can I specify this "const" in C# code? public static extern voi
scientific I try to call a pure C function from an external DLL in a C# application. This function is defined as void set_param(const char *data)
Now I have some problems using this function: How can I specify this "const" in C# code? public static extern voi
scientific I try to call a pure C function from an external DLL in a C# application. This function is defined as void set_param(const char *data)
Now I have some problems using this function: How can I specify this "const" in C# code? public static extern voi
scientific I try to call a pure C function from an external DLL in a C# application. This function is defined as void set_param(const char *data)
Now I have some problems using this function: How can I specify this "const" in C# code? public static extern voi
马赫什(Mahesh Chaurasia) I'm writing in C++ using open files ctypesin Python . my C++ code: extern "C" {
void openfile(const char *filename) {
cout<<"File to open for writing = " <<filename<<endl;
FILE *fp = fopen(filename,"w");
fprintf(fp,"writing in
Nikhil Padmanabhan Suppose I have church strings var s : string;
How can I send it to the expected function char*( c_stringhypothetically const char *)? mppf Here is an example of doing so extern {
#include <stdio.h>
static void f(char* argument) {
pr
Nikhil Padmanabhan Suppose I have church strings var s : string;
How can I send it to the expected function char*( c_stringhypothetically const char *)? mppf Here is an example of doing so extern {
#include <stdio.h>
static void f(char* argument) {
pr
tiktak I am trying to get the mac address with the following code: void getMacAdress(unsigned char **address)
{
int s;
struct ifreq buffer;
s = socket(PF_INET, SOCK_DGRAM, 0);
memset(&buffer, 0x00, sizeof(buffer));
strcpy(buffer.ifr_name,
Roger Tannous I am passing a buffer (char*) to a function in C. Inside the function, I'm allocating memory for the buffer and appending a string (response from the virtual server). When printed inside the function, the string will appear as the string sent fro
tiktak I am trying to get the mac address with the following code: void getMacAdress(unsigned char **address)
{
int s;
struct ifreq buffer;
s = socket(PF_INET, SOCK_DGRAM, 0);
memset(&buffer, 0x00, sizeof(buffer));
strcpy(buffer.ifr_name,
Roger Tannous I am passing a buffer (char*) to a function in C. Inside the function, I'm allocating memory for the buffer and appending a string (response from the virtual server). When printed inside the function, the string will appear as the string sent fro
Roger Tannous I am passing a buffer (char*) to a function in C. Inside the function, I'm allocating memory for the buffer and appending a string (response from the virtual server). When printed inside the function, the string will appear as the string sent fro
tiktak I am trying to get the mac address with the following code: void getMacAdress(unsigned char **address)
{
int s;
struct ifreq buffer;
s = socket(PF_INET, SOCK_DGRAM, 0);
memset(&buffer, 0x00, sizeof(buffer));
strcpy(buffer.ifr_name,
Abruzzo Forte and Gentile This is a newbie question, but I don't understand how it works. Suppose I have the following function void foo(const std::string& v) {
cout << v << endl;
}
and the call in my program below. foo("hi!");
Essentially, I'm passing a
atomSmasher I've made a mistake with a socket interface that I've been writing for a while , and I just noticed this while browsing through the code to find another problem. The socket receives a string and passes it to jsoncpp to complete the json parsing. I
atomSmasher I've made a mistake with a socket interface that I've been writing for a while , and I just noticed this while browsing through the code to find another problem. The socket receives a string and passes it to jsoncpp to complete the json parsing. I
atomSmasher I've made a mistake with a socket interface that I've been writing for a while , and I just noticed this while browsing through the code to find another problem. The socket receives a string and passes it to jsoncpp to complete the json parsing. I
atomSmasher I've made a mistake with a socket interface that I've been writing for a while , and I just noticed this while browsing through the code to find another problem. The socket receives a string and passes it to jsoncpp to complete the json parsing. I
good man I have the following code. const char* my_input = "my string";
void my_function(char* my_argument);
int main()
{
my_function(my_input);
}
void my_function(char* my_argument)
{
/* Do something */
}
Note that the argument to my_function expects
green bow char *strinv(const char *s); //that's the given prototype
I'm not very safe with the *strinv part. Does this mean that the function is automatically dereferenced when called? Or is the function defined as a pointer? Thanks in advance for the clarifi
green bow char *strinv(const char *s); //that's the given prototype
I'm not very safe with the *strinv part. Does this mean that the function is automatically dereferenced when called? Or is the function defined as a pointer? Thanks in advance for the clarifi
good man I have the following code. const char* my_input = "my string";
void my_function(char* my_argument);
int main()
{
my_function(my_input);
}
void my_function(char* my_argument)
{
/* Do something */
}
Note that the argument to my_function expects
good man I have the following code. const char* my_input = "my string";
void my_function(char* my_argument);
int main()
{
my_function(my_input);
}
void my_function(char* my_argument)
{
/* Do something */
}
Note that the argument to my_function expects
username I want to understand this better, so I'm asking here. I wrote a function that reads a file and returns the content as a string. It's currently implemented to return a char*because it seems easier, but I'm wondering if this is the correct way to do it,
green bow char *strinv(const char *s); //that's the given prototype
I'm not very safe with the *strinv part. Does this mean that the function is automatically dereferenced when called? Or is the function defined as a pointer? Thanks in advance for the clarifi