| |
| |
| |
|
Page: 1 2
Comments:
<0> 1st <1> nity <0> moin <2> good morning <1> laters(tm) <3> hi <3> i have a problem, i want to write an apache module, or rewrite mod_auth_mysql by adding some changes, user conn limit, anybody know how can i write it (i need a method)? <4> i think there is a nice papper about writting apache modules <3> ok, i now technique to write this addon, because i dont know the result <5> hi <6> wheee.. the Master joined! <7> yupi! <5> void *m_Values; <5> Value = *(((signed char *) m_Values)++); <5> this is bad, why? <6> tell us, Master!
<8> why is m_Values void * in the first place, if you use it as a signed char *? <5> 1>c:\dokumentumok\myformat\sourcestring.cpp(37) : error C2105: '++' needs l-value <6> .o(++ on a pointer?) <5> yes <5> I coming soon with interpreter <5> :D <5> sorry, i'm don't speak english <5> :D <6> I noticed that. <6> maybe I should ask if CoderMaster means something else in your language <9> hmm, I don't see why you couldn't ++ a pointer. <10> i don't get a compiler error for 'Value = *(((signed char *) m_Values)++);'... just a warning: use of cast expressions as lvalues is deprecated <9> this works though: Value = *((signed char *) m_Values++); <11> hi <9> damn them, they've deprecated my favorite way of enforcing what happens with *p++; <11> i would like to have a string with N chars. N is int and is read when program starts, how could i asign char x[N] ? <12> dunno what u mean <9> AeGiS-, use malloc(). <11> i've done this <11> but i dont understand something <11> can i paste 3 lines? <9> preferably use pastebin. <9> .com <12> lol :) <11> it works very slowww.. <12> phpfi was better <9> there's another place through topic's url. <11> http://www.rafb.net/paste/results/OPAoZR97.html <11> im just wondering if p is [100] large, how could then x be 1234 ? there is no error, it even prints okay. <12> AeGiS-: yes, it's all ok <11> but <9> no it's not ok. <11> how big is x now? <12> AeGiS-: 100 <9> compiler does not check for array bounds, it is your duty. <11> if x[1234] works fine <9> if it works, it is luck. <11> if p is 200 then x is 200 ? <12> AeGiS-: this is an attribute of C language <9> for p[200] the last good index is 199. <9> read a book. <5> bye, later back <12> AeGiS-: when u write in memory somewhere u dont know what is there - u risk very much <11> yes i know its 199. <12> AeGiS-: but it is a FEATURE <11> i have one more quaetion <11> queston evn <11> eh <12> question <11> yes yes :D <11> how to do 2 dimensional array if you dont know bound for any dimension <9> it is good that the Master promised to return to us. <9> aegis: use malloc. <12> AeGiS-: the same way <11> how the same way? :) <12> AeGiS-: in computers - everything is just 1 dimension stream of bits <11> yeah :) <11> so you say if i have x = (char*) malloc(sizeof(p)); p[100] here. there i could use x[10][10]? <12> AeGiS-: read some book - it will help u <12> AeGiS-: rather no
<11> i have books over here <9> your sizeof(p) doesn't work if p is an array of ints. <12> AeGiS-: stop watching them - read them :) <11> but they dont cover dynamic memory <9> heh, good books you have :-) <11> something to begin with <9> the hardest yet most central thing about C is not covered. <12> AeGiS-: i never saw books like that ! :) <13> char str[7]="FOO"; <- is it true that str[4]==str[5]==str[6]==0 ? <12> antifreeze: is that working at all? <13> or should I use "FOO\0\0\0\0" ? <9> antifreeze, probably it is not initialized to 0. <12> antifreeze: last your answear if that works at all :) <13> well, i test it after i get other bugs away <9> antifreeze, C ref manual actually has an example of wchar_t array of being filled with \0 to the end. But text does not say anything clear about it. <9> but I guess it falls under char str[7] = { 'F', 'O', 'O' } which gets the unspecified indexes initialized with 0. <1> lo <9> lo. <9> michai, weren't you trying to have a macro do something like: #define X() { int* n = malloc(sizeof(int)); n; } ? <1> #define FETCH() do { n = read( theindex ); theindex++; n; } while ( 0 ) <1> something like that <1> it's long sorted though <1> the malloc was ceteh making a garbage collector iirc <9> Yeah, but turns out this actually works and returns n: #define X() ({ int* n = malloc(sizeof(int)); n; }) <1> +h <9> I don't know why it works. <1> well <1> value of expression is last evaluated expression I spose <1> or so <9> I guess, but {}is not an expression? <9> (+ the stuff in it) <1> I think it's not, actually <1> so... I dunno how it works <1> I am digesting much food atm, brain is 24% power <8> it's a gcc extension <9> ah. <1> ow <9> damn. <8> the first one in http://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_4.html <8> did that some time ago. but yes, i'm still bored :-) <1> I don't like extensions that much tbh <1> but, I didn't know all this :) <9> hmm. I compiled with -std=x89 (and -ansi, which is the same) and it still works. <9> x=c <9> bad compiler. <1> apropos <1> does anyone know how/why gcc3.x or 4.x have support for attiny2313 instead of at90s2313 ? <1> the former has some leet options, but there doesn't seem to be a -mmcu option to select it <1> s/options/features <8> instead? <1> well <8> i compiled code for both with gcc 3.4.5 <1> there's -mmcu = 90s2313 <1> really? <1> well so did I <1> err no, 3.3 <9> domen, did it run? ;-) <8> Auris: hehe... yes, it ran on both uCs <1> domen, what -mmcu option did you use? <1> e.g. 90s2313 has 10 interrupt vectors or so, attiy2313 has 15 or so <8> michai: just a sec, to find some Makefile <1> ok <1> I did check gcc 3.x and 4.x docs <8> michai: -mmcu=at90s2313 or -mmcu=attiny2313 <7> :)) <1> that last doesn't work for me <1> bugger <7> whazzup? <1> is it a 3.4 feature then :-\ <8> oh... now i remember... i applied some patch for the tiny <1> aha <1> did you build crosscompiling gcc himself
Return to
#c or Go to some related
logs:
#worldchat #worldchat #c boicottaggio juventus a camorr #worldchat #london gigalos in finland
#worldchat #worldchat
|
|