@# Quotes DB     useful, funny, interesting





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



Comments:

<0> i was thinking since you can define char * str = malloc(5); does this also apply for a struct ?
<1> yes
<0> so that i can benefit from ptr++;
<0> gd
<1> struct *name = malloc(sizeof(struct name)); etc.
<1> those 'name's shouldn't be the same though
<0> ok i understand
<0> and i have another curiosity whats the difference between typedef struct and struct is it just for the definition you give to a typedef ?
<1> typedef struct example example_t; using 'example_t' is the same as using 'struct example'
<0> typedef struct foo { bla bla }Boo; is it just for the Boo part ? that differs from struct foo{ bla bla }
<0> ok
<2> OK who owns a copy of Applied Cryptography? don't lie, I know somebody here has it...
<3> :D
<2> SvearRike....? you? =)
<3> squib, no , sorry, haven't got it :)
<4> I'm using SAPI with managed c++ in an application where many threads can interact with SAPI com objects and when i try to access the com objects created in another thread i get an exception "COM object that has been separated from its underlying RCW cannot be used". Has any one seen this before, or can anoyt sugest a solution?



<5> hipper: you're in the wrong room
<4> ya i know its a c room just thought id ask here and see if nayone might have an idea
<4> you know if there is a managed c++ room ? all i van find is c++ and is dead in there?
<4> van = can ;)
<5> if it's dead, it's dead.
<5> c++ is not topical here
<5> be patient in #c++
<4> yepper thats what i'm doin, thanks
<6> hello
<6> I have a question, is it possible to use open() on a unix socket?
<7> anyone have the book "engineering a compiler" ?
<0> if i have a char ** str; and *str = "hello\0"; and i want to remove the first 2 chars and make the string as if it was *str ="llo\0" in the first place. i mean of exact size
<8> str + 2
<8> *str += 2;
<0> :/ but the size will still be for 5 characters no ?
<9> Why would you put the \0 there
<0> terminator hux
<9> That's useless
<8> strlen(*str+2) = 3
<9> char * str2 = str + 2;
<9> char str2[xx]; strcpy( str2, str + 2 );
<9> etc
<0> cause am doing string manipulations but i want to be sure that my new string is fine
<0> so that i dont get segmentation fault in the long run
<0> i cant get it dont
<0> done
<10> cant get what dont?
<0> am trying to build a search and replace function for strings
<10> Sounds easy enough
<10> Look up Boyer-Moore
<10> The rest is just housekeeping
<0> i did one but its failing at some instances
<0> my problem is not the search its the house keeping
<5> wb C_Dreamer
<10> tx
<10> how's your Linux?
<9> Years ago, people would ask "how's your wife", "how are your kids doing"
<9> Now it's "how's your Linux, are your CPUs OK?"
<10> seriously, dbtid - how's your Linux?
<10> oh well - it'll have to wait a while now
<10> bbiahot
<11> hello
<11> i need help
<12> what's up?
<11> with cpu usage in C
<11> fine and you?
<12> i'm fine. so what's the boggle?
<11> i'm under netbsd and i want to know if its possible to have the cpu and memory usage
<11> like the commad top
<11> sorry for ;y english, im french :p
<12> it should be possible, after all top does it.
<1> use the kvm interface
<1> man 3 kvm
<11> hum ok
<11> i take a look
<11> thank you
<13> why will printf ("%llx\n", (1<<i)); print garbage in front of the number? like bfbfe80000000001
<13> it looks like some stack address
<12> because you failed to supply the type you said you would.
<13> oh
<12> i.e., what type does i<<i have?



<14> 1 << i
<12> vs, what type does %llx expect?
<14> good question
<13> aah
<13> thank you
<14> i wonder if it's signed or unsigned
<12> what type does 1 have?
<13> with a (unsigned long long int) cast it works
<12> don't cast.
<13> what should I do then?
<12> make 1's type appropriate.
<13> how can I do that?
<12> most people would use a suffix.
<12> you can cast, but you must be careful what you cast.
<12> casting the 1 is good. casting 1<<i is bad -- try an i of 40 to see what i mean.
<5> howdy twkm
<12> morning dbtid.
<13> ok... but if I have another variable instead of 1 I have to cast?
<12> depends on the variable's type.
<12> not unsigned long long, yes you must cast. but not the full expression, only the variable.
<5> twkm: refresh my memory, please... the constant '1' has what type? i recall that the standard specifies that, but i don't recall what.
<5> oh, i didn't mean the character '1'
<5> i meant the integer value 1
<5> bad representation
<13> thank you, now I think I understand
<12> i.e., good: (unsigned long long)x << i; bad: (unsigned long long)(x << i);
<12> dbtid: int.
<5> hmmm
<5> ok
<5> "The type of an integer constant is the first of the corresponding list in which its value can be represented."
<5> so if you put the value 4294967296 it will be a long long int by default
<5> but if you do 1 << 32
<5> you had better cast the 1
<12> provided you have a c99 compiler with 32 bit int and long, yup.
<5> yes, of course.
<12> in this case the suffix or cast is needed to match the printf.
<5> oh, i just got back here; i didn't see the earlier stuff
<12> and perhaps to avoid undefined behavior as well, though that isn't as clear.
<12> 2 minutes to get to 45%, 1 more minute to get to 52%. from here it takes about 10 minutes to finish. inverted hyperbola perhaps.
<5> what are you doing?
<12> virus scanning an xp machine.
<5> oh sounds like fun
<5> you expect to find something?
<12> nope.
<5> i wouldn't either; the viruses are smarter than the virus scanners
<12> i've caught plenty of stuff at customer locations. but yeah, a too strong a feeling of well-being merely because a scan is clean would be a mistake.
<5> heh yeah
<12> still going! sheesh. i need to kill some files.
<5> yeah, start with the ones that microsoft put on the machine...
<12> yeah. sp2+all fixes is a boatload.
<15> hi
<16> greetings
<15> why most ppl do c in linux ?
<17> who says most people do? there are a lot of tasks that C is better suited for than other languages, but i don't know that it's the most popular
<15> o
<5> jotun: what are you talking about??
<17> i'm for serious !!
<5> jotun: who were you responding to?
<5> oh bouzukist
<5> sorry i see it now
<17> that's ok, i haven't had my coffee yet, either
<13> if you want the lower three bits of x into the upper three bits of y, is there anything against x = x >> 3; (on purpose, don't need the last 3 bits); z = y<<(sizeof y-3); x &= z;
<13> ?
<13> uhm, of y into the upper three bits of x, sorry
<18> Hi
<18> Can u help me in C?
<10> DoronD: I answered you in #programming


Name:

Comments:

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






Return to #c
or
Go to some related logs:

dos messeges
#asm
#linux
cebu weman
apache 2.2.0 AuthGroupFile
#windows
I hate john stewart
#linuxhelp
#MissKitten
+ecoprick



Home  |  disclaimer  |  contact  |  submit quotes