NSX Posted December 16, 2003 Posted December 16, 2003 Let's see here: --edit-- What's the character behind the pole? is it the '\0' symbol?
LuTze Posted December 17, 2003 Posted December 17, 2003 Yeah, in C the end of a string is a NUL. If they want to attract the right kind of people, that ad is a good start
Dave Posted December 18, 2003 Posted December 18, 2003 I should think any decent software manufacturer would if it's that kind of genre.
Dave Posted December 18, 2003 Posted December 18, 2003 All C/C++ strings are null terminated, which just means they have the ascii code 0 at the end of them.
NSX Posted December 19, 2003 Posted December 19, 2003 dave said in post #8 :All C/C++ strings are null terminated, which just means they have the ascii code 0 at the end of them. Yeah, in the pic, it looks like a 0. But when I did C programming, i had to use the \0 symbol. Afterall, using 0 would copy 0 into the string right?
Sayonara Posted December 19, 2003 Posted December 19, 2003 Wouldn't using a slash escape the reserved character zero, allowing it to appear in the string?
LuTze Posted December 19, 2003 Posted December 19, 2003 It is a zero, but it's a decimal zero. If you look at the table above, 0 in decimal is the charachter NUL in ASCII, which is represented as '\0' in C source. char a = 0; and char b = '\0'; are the same thing.
NSX Posted December 19, 2003 Posted December 19, 2003 LuTze said in post #11 :It is a zero, but it's a decimal zero. If you look at the table above, 0 in decimal is the charachter NUL in ASCII, which is represented as '\0' in C source. char a = 0; and char b = '\0'; are the same thing. doh! pa-choing!
YT2095 Posted December 19, 2003 Posted December 19, 2003 NSX, since they`re "Now Hiring" people, go for it dude! 89,111,117,32,110,111,32,87,111,114,115,101,32,32,58,41,0
NSX Posted December 23, 2003 Posted December 23, 2003 YT2095 said in post #14 :NSX, since they`re "Now Hiring" people, go for it dude! 89,111,117,32,110,111,32,87,111,114,115,101,32,32,58,41,0 huh? Much easier compiling in C than converting. lol #include <stdio.h> int main (void) { char str[] = {89, 111, 117, 32, 110, 111, 32, 87, 111, 114, 115, 101, 32, 32, 58, 41, '\0'}; printf ("%s", str); return(0); }
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now