Omgili - forum search, search forums  
  

Discussions about char

Displaying 1 - 10 out of 117,303 discussions.  
RSS Feed Options
Time Frame: (Any time)   Minimum number of replies: (2)   Minimum number of discussing users: (0)
  |  

Page: 1   2   3   4   5   6   7   8   9   10  
Keep this page open to be updated with the newest discussions automatically.
The code below compiles, but has different behavior for the char type than for the int types. In particular cout << getIsTrue< isX<int8>::ikIsX >() << endl; cout << getIsTrue< isX<uint8>::ikIsX >() << endl...
Started by on , 5 posts by 5 people.  
It probably would have been nice if char was just a synonym for either signed char or unsigned char depending on your compilers from the ....
That's correct, char, unsigned char and signed char are separate types.
I assume when I do char* = "string" its the same thing as char* = new char[6] . I believe these strings are created on the heap instead of the stack. So do I need to destroy them or free their memory when I'm done using them or do they get destroyed by...
Started by on , 7 posts by 7 people.  
I assume when I do char* = "string" its the same thing as char* = new char[6....
Should read: const char* c = "string"; And a new char array should be delete d just like any other need to delete [] your second example.
Yo! I'm trying to copy a few chars from a char[] to a char*. I just want the chars from index 6 to (message length - 9). Maybe the code example will explain my problem more: char buffer[512] = "GET /testfile.htm HTTP/1.0"; char* filename; // I want *filename...
Started by on , 6 posts by 6 people.  
char buffer[512] = "GET /testfile.htm HTTP/1.0"; char filename[512]; ....
The next problem is your offset.
Either just declare char filename[512]; or malloc some memory for the new name (and don't a buffer for filename .
At anything.
Ask your Facebook Friends
Hi all, I'm a beginner in C++ Programming language. I wanted to write a program that take the alphabets in a string array called str, and copy it in a new array called str_alpha. And the same goes to numbers, the program copies it from str array to str...
Started by on , 6 posts by 6 people.  
The do not use char* and the likes; use C++ predefined; for (unsigned int i = 0; i < str.length(); ++i) { char chr = str[i]; if (isalpha(chr)) alpha.push, used to copy strings , not individual....
I'm a beginner in C++ Programming language.
Someone here recently pointed out to me in a piece of code of mine I am using char* name = malloc(256*sizeof(char)); // more code free(name); I was under the impression that this way of setting up an array was identical to using char name[256]; and that...
Started by on , 7 posts by 7 people.  
It's useful to recall the whole "declared....
} I was rather surprised in answers.
Also, sizeof(char) is always 1 according, // file foo.c char name[256]; int foo() { // do something here.
Running out of stack or doing heavily recursive stuff.
I was interviewed recently and asked to write mystrcat(*s1, *s2, *s3) where s1 and s2 are source string and the concatenated results are given by s3 . I was told, don't worry about memory allocation of s3 and assume s1 and s2 are not null / invalid strings...
Started by on , 8 posts by 8 people.  
Then you basically....
) || (!s3)) return; Here would be my comments Both s1 and s2 should be typed to const char* since you have been: void mystrcat(char *s1, char *s2, char *s3) { ASSERT( s1 ); ASSERT( s2 ); ASSERT( s3 ); ....
I have a old program in which some library function is used and i dont have that library. So I am writing that program using libraries of c++. In that old code some function is there which is called like this *string = newstrdup("Some string goes here...
Started by on , 6 posts by 6 people.  
In a different way: int redup(char **s1, const char *s2) { size_t len, size; if (s2 == NULL) return -1; len strdup : char * newstrdup(char const* str) { char *c = new char[std::strlen(str) + 1]; std::strcpy(c....
Is there a function in c that will return the index of a char in a char array? For example something like: char values[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; char find = 'E'; int index = findInedexOf( values, find );
Started by on , 7 posts by 7 people.  
For example: char values[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; char find = 'E'; const char *ptr = strchr(values, find); if(ptr) { int index = ptr - values; // do) from the original char....
The offset with the starting pointer.
How can I convert a char to a char* in c#? I'm initializeing a String object like this: String test=new String('c'); and I'm getting this error: Argument '1': cannot convert from 'char' to 'char*'
Started by on , 15 posts by 15 people.  
You can simply use: String test="c"; If you have a specific need to convert a char variable character, you can use the following: String test = new String(new char[] { 'c' }); string myString1 = new string(new char....
To store in it.
How can I convert an std::string to a char* or a const char*?
Started by on , 4 posts by 4 people.  
You can use &mystring[0] to get a char * pointer::string to a function that needs const char* you can use std::string str; const char * c = str.c_str(); If you want to get a writable....
Use the .c_str() method for const char *.
Page: 1   2   3   4   5   6   7   8   9   10  
Related Searches
CHAR kula    Char    Arctic Char    xa1xa7ASP NET' and char 124 user char 124 =0 and ' '='    chars muitos chars para mugen    FF char for mugen    sonic mugen char    char HD mugen    SSJ4 GOHAN char    char-broil tristan   
More Information


Forum Search About Omgili Help Plugins Forum/Board Owners Privacy

i
In Title
In Topic
In Reply
Exclude
Boost