@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3



Comments:

<0> Yes, very clever. And now using just an integer constant.
<1> what do you mean ?
<0> string[/*what?*/] = 'd';
<1> ohh
<0> The last character in the string.
<0> Well?
<1> string[strlen(x)-1]='d'



<1> i don't know !
<0> string[3] = 'd';
<0> It's really simple.
<1> ohh
<1> i understand !
<0> So if the string is 4 characters long, the last character is string[3].
<1> string[3]
<1> ohh !
<1> Thank you PeteD
<0> So if you want to print the string, size_t pos; size_t len = strlen (string); for (pos=0; pos < len; pos++)
<0> pos < len
<0> Why not <=?
<0> Zulander: Can you answer that?
<1> PeteD, i am thinking !
<1> i can't asnwer that one !
<0> Alright.
<0> What's the value of string[len]?
<1> 3
<0> Oh?
<0> If len == 4, how many characters are there in string?
<0> I'll tell you: it's 4.
<1> 5 no
<0> The FIRST character in the string is string[0]
<0> the LAST character in the string is string[3]



<0> SO
<1> ahh
<1> i see !
<0> Why <, and not <=?
<1> it will never reach 4
<0> Right.
<0> Because at string[4] is a secret, hidden character.
<0> Namely, 0. Or '\0'.
<0> And you don't want to print that. You want to print everything UP TO that.
<1> oic !
<0> And if string isn't a string at all, but an array
<0> Then array[4] doesn't exist AT ALL.
<0> You'd be accessing something you're not allowed to access.
<1> ok !
<0> Which will make small (if you're LUCKY) daemons fly from your nose.
<0> So there you have it.
<1> Thank very much !
<0> If you want to know what to put in your for loop (< or <= or ==)
<1> for you help now !
<0> Just think very hard on WHAT you want to DO.
<0> You're welcome. No problem. And now I'm going to go back to work.
<1> PeteD, have a nice day
<0> Likewise.
<1> i am going back to school work !
<1> ttly
<2> ok
<3> I am designing a file structure based on btree. I designed the records page structure which aslso holds data, however I am thinking if I shall do another page structure that will only hold data in case of overflows, or use the records page structure as an overflow page too.... any suggestions ?


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #c
or
Go to some related logs:

#linux
#c++
how to wire DB9's using cat5
kurt cutajar
#linux
ModifyMenu c++
lesti porn
#windows
taran prost
mobile cuntrycode



Home  |  disclaimer  |  contact  |  submit quotes