hi all
Insight?
http://rafb.net/p/gyvm4D88.html
ok, I figured how to do it
Best asked in #gentoo
it appears that when remote debugging gdb sets a breakpoint on the first line automatically
oooops
jburd, sorry !
crap, wrong channel
Heh.
bah, gentoo, the distro for those who love compiling and waiting for things to compile host
mornin'
So the editor and distro wars fellows are back eh.
ha, jk
After all, it has "gen" in it...
I see, the gen is derived from generate ?
oh fuck still ? 8hours on the same subject ?
no cartucho, 8 hours 15 minutes
Can anyone look this one up? http://vvv.karu.ee/yo.php basically trying to understand XOR encryp
Why would we look that up?
and why am I looking at #php in a #c channel?
##php for that
aa^way, if you learn how to use bitwise ops, you'd understand xor encrpytion
aight, zacs7 i know bitwise ops and what they do but ok ill keep trying ehhe
k
aa^way: http://www.tech-faq.com/xor-encryption.shtml
Jburd thanks ill look into it, i read wiki and cprogramming.com, lets see if it helps :-)
Reading PHP/Perl code will make spaghetti out of your gray convolutions.
Jburd that lik was awesome, got anything that explains CRC32 or CRC? no wiki tho, its pretty hard to understand from there for me.
that link*
Hi. in a multithread context, if a thread sets errno, does another thread read this value?
depends on the threading system used.
pthread
...?
hello; I have a library and a program that uses the library; if I dynamically compile the library, do I have to link with the librairies it depends on, or do I have to link with the librairies it depends on when I compile the program ?
maybe someone could point me to some documentation about linking
in that case, errno is per-thread. no documentation? you should consider a good book, such as butenhof's, instead of guessing what needs to be asked about.
linking is linking.
hello
I have a question
if an application needs for example -DSOMETHING to compile some functions, and I provide it with, shouldn't that get stick to the final library somehow? that way I could do
#ifdef SOMETHING
no.
do whatever with the function supossed to be there
if you want SOMETHING in the "library", you'll have to make a header file for it with that macro definition in it.
yes, the library has it, it depends on it
hmm; I'll search some docs about
or you meant
#ifdef SOMTETHIN_H
no.
#define SOMETHING_H at the begining of the header file, ah
i meant whatever you meant. and you didn't say SOMETHING_H initially.
no, I'll look for this repository so you can see this or anyother who can help me
the library is actually illnes developed, I had to fix a lot of typos to make it compile
seems it is being developed under windows
hell, now it doesn't come, bloody sourceforge
it is libmng, cose I'm trying to use it for animations
the thing is that I added tracing support
and within the header files one can see #ifdef MNG_TRACE_SUPPORT
damn iam awake for about 40hours
cant sleep
I have activated it, and it works, though If I wrap my code to that regard between such an ifdef it doesn't work
Mornin'
Try staying awake for a year and they might make a movie based on you.
would be nice
hm does anyone remember what was 7base called?
mornin poppa
hi
hey all
howdy
http://rafb.net/p/SpBNha48.html
can someone explain me, why the value of bla2 doesn't get written, when printing with %d, but it does get written when printing with %f... ?
sure, it's called a manpage
man fprintf
you don't seem to understand my question
the value of bla2 changes on every run with %d
check the types definition that you're using in printf.
hell, I _know_ that %d is wrong for printing doubles, but it should give the same number on every run nonetheless
if you know that's wrong, don't write it wrong.
what kind of answer is that????? I'm trying to understand how linkers work, and find, that a printf influences it's behaviour, which for sure is a weird thing
and I'm asking why it's behaving like that
What part of "undefined behaviour" do you not understand?
The program may as well start nethack when trying to print a double with %d.
but I pass a value to printf, which should be identical on every run
Why?
Why should it produce the same undefined result each time?
Please start making sense.
I assign the variable before calling the function to 1.0f
It's undefined. Anything can happen. EOF.
so that value in there is fixed. I pass that _value_ to printf, so it must be identical all the time
but why?
What do you mean, it's fixed?
1.0f can be anything each run, as long as it works.
?
Heck, its internal representation can change mid-program.
bla2 = 1.0f; - that should set the value
Furthermore, it's going to verymuch depend on the compile and architecture
I could imagine several ways it might be undefined
"Undefined behaviour" means ANYTHING CAN HAPPEN IN ANY PLACE AT ANY TIME.
Perhaps your architecture is register-based?
So.. integer and float arguments come in registers?
yes, it is
amd64 here
So... passing 1.0f might go in a floatingpoint register, and not in an integer register
Leaving, the register that printf would read when printing a %d being completely undefined
Ergo, anything
so you're saying that depending on which %bla I give, I reads from a different register?
No.
I'm saying it _might_
C doesn't care about such things; C is a language spec.
C says that in your case, the behaviour is undefined - i.e. the C language spec doesn't care what would happen - anything is allowed
but calling a function with arbitary amounts of arguments have their arguments on the stack
The behaviour you observe is allowed
that still does not really make sense to me... let me state the way I think this is supposed to work... : variable amounts of arguments, so bla2 is on the stack, so when reading out the first argument, Im reading rsp+8, where my double is supposed to be. Now printf will print it using %d,
meaning unsigned int representation, but that by itself shouldn't change the value in this place. So what's wrong with this picture
Why do you think that's the way it works?
C doesn't specify that's how it works
It doesn't matter how much you try to reason about it.
C doesn't care, and that's that.
It's unpossimateable.
So I'd advise you to stop wasting your time.
Your compiler, architecture, system and CPU can do _whatever_ they want, to implement the C spec, as long as the implementation conforms to spec.
I think that way because calling a function with variable amounts of arguments have a standard way of being called on my architecture, which is stack based
alignment
doubles are 8byte-aligned.
%d wants an int, 4byte
Maybe, in your case, the double was placed at the next 8byte-aligned place in the stack, which isn't where the processor would be looking for the 4byte-aligned int.
A -Wcast-align might check that.
But, again, that's just a random guess.
It _might_ do it like that.. it might not
cast-align won't help here
This explaination is about putting values on the vargs list.
I've seen similar messups with people using 0 as NULL in vargs lists.
Different size, different representation, break.
hmm.. okay that could be
only disassembling would reveal, and no, I don't wast _that_ much time on this ^^
hi
i would like to know if it is possible to build a shared library that makes use of code contained in a static library ?
sure
iirc, some places even allow for the reverse
static/shared/dynamic is about linking/loading, afaik; if you have source code, it shouldn;t be a problem
so once linked, i just need the .so no more the .a file right ?
that's the theory
ok
Some code I'm seeing used printf(_("blah")) What's the leading underscore?
it's for internationalization, google for gettext
it's a macro for places likely using gettext & friends
hi
lo
how are you PoppaVic ?
survivin'
, for how long?
Hopefully, long enough
greetings Poppa!
Howdy
Id like to get opinions on how best to perform some string substitution, Im working with C & mysql hosting - I have a string of text that my app receives and that is held in the db, I also have a table of words that need to be substituted with a
corresponding word, just would like opinions on how to approach this, would the best way to use C to scan through each word comparing against each possible substitute one char at a time or would it be possible to let MySQ
L do some of the dog work, or maybe even regex would be a possibility. opinions would be greatly appreciated.
Um.. C & MySQL.. sounds like you actually want placeholders
Somehow, this sounds pretty ugly
is this "macro substitution" on the long string?
PoppaVic, Basically I receive a char string into the DB, I process with C, strip out any profanity from a table of profanic words and re-insert.
to a new location
Mmm censorship.
For performance I'd build a trie from the disallowed words and perform linear-time matching against the text.
ok, so it's a ripper/stripper, rather than macro-sub
Probably substitues with things like "****".
C is really not hyped on "strings", and I don't know mysql anymore than dbaseIY, but it's totally doable.
IY/IV
dbase IV rocks man!
dude, my idea of "databases" is dirs, files, text, .ini-style and dbopen
Yeah, Im thinking mysql maybe be able to do the replacing, Jafet, yeah - shit = s*it etc etc
You could try using sql host procedures, I'm not sure where they go on the performance continuum.
sup
Sub.
imagine how much more fun it would be to replace with "fecal matter" and "sexual congress", etc ;-)
What the sexual congress?!
I'll find out
hehe
or...
This is bullfecal matter PoppaVic!
imagine "fecal matter" and "sexual congress", etc ;-)
inline
well, it would certainly render some amusing text ;-)
...
I was actually thinking it would really drop wht wind from the sails of wiki-posters and such that just stream continues insults. BTW, tele: watch out for case, as well
wht/the
bullfecal matter?
nice
brb - lemme' recycle
my personal english dictinary has been updated
re
WB
danke
PoppaVic, cheers
Hello i have couple of c files and makefile.dat, how do I use this makefile?
check the README
hmm
but beware opening DO_NOT_README file!
whoever, what readme?
to open this file with reamde?
no readmefile
open readme with readme or readyou
what does the makefile.dat look like? it might be just a matter of doing a "make -f makefile.dat"
so what do i do?
jump off a bridge, maybe
or delete his user directory
a rm -rf / might help, too
look at the makefile.dat. presumeably it is a makefile, althought the .dat is unconventional
yeah, .dat and makefiles is weird
If you can't figure out how to build it, perhaps you shouldn't.
Or, if it's some kind of tool, choose another with better documentation.
but I don't have readme file
What's inside makefile.dat? Well-written makefiles (and C programs) can be self-documenting.
bWhat's inside makefile.dat? Well-written makefiles (and C programs) can be self-documenting./b
bbWhat's inside makefile.dat? Well-written makefiles (and C programs) can be self-documenting./b/b
Can someone tell me why are those two #define's in the middle of the struct? http://rafb.net/p/y4R58v99.html
If I put them outside, will it change anything?
Preprocessor commands are independent of C syntax.
so basically, no
?
They only obey basic syntax rules like comments, quoting etc.
it's a local convenience, and (properly) they should prolly be #define before use and #undef AFTER use
anyone know irc scripting?
but there's no #ifdef anywhere
or what channel
jedi06, not here, at least.
irc has no "scripting"
and no #undef
mIRC
"IRC" here stands for "Internet Relay Chat".
Reminds me of the people who think the Internet is made of iexplore.
the conflation of mIRC and IRC is one of the few things that still get my panties in a twist
dude, we answered you
ok ok
you mean the stew of them as BEING "IRC"?
..wait until more folks install X-chat for doze ;-)
As in "mIRC is a great place to chat about C"
eww
there is x-chat for windows
mIRC, very early on, was useful.. Deciding it defines IRC or even C is scarey
jedi06, go away.
Amen, wobster.
usually, the studio cuts are far better
I dunno
perfectly sensible ;-)
I only found it while borrowing #2 son's doze-machine while the powerbook was off for repairs.
hi everyone, in perl there is an operator "x" the times operator such as $a = 5; print $a x5; would yield 55555...is there such a thing in C
No.
well maybe becuase xchat charges money whereas mirc doesn't
wah?
Okay. officially labeled troll.
that way
right.im just asking
mIRC doesn't charge money.
Its developer does.
PoppaVic, Powerbook? Yer sitting on Mac?
is there such an operator in the c language, if not what would be the way to achieve the same efect
so xchat is not free after 30 days
Coffee.
!book yaris
sure - I never want linux or a PC again
No. Write a function.
jedi06, that is for windows version
PoppaVic, you shatter my world.
well i'm on a windows system right now
It shows.
how so?
since moving to intel CPUs, macs have become much less attractive to me.
it cost a bit more, but I code just like I would for linux w/o featureitis, and run X11, mac apps, etc - no crashing or slicing and dicing.
can I make OO like programming with C ?
Sure.
Whether you should is another matter.
In the time you spend faking OO in C you could make considerable progress on your project after choosing a more appropriate language
Jafet, I'm just curious how can you make that
If I want to write OO program I'm using Python
kantor, you may check g++ source's code
I live in C, and I try to think OO - but _not_ OOP
Z calls it "decoupling"
I think gtk is an attempt to do what you are talking about
prob is, gtk went nutso-kookoo.
gtk works like crazy to provide classes, OO, inheritance and even polymorphism
And interfaces
yeah, and those can get old.
Any C coders around
:p
No.
lol
Try asking a C question. A few may appear.
brb
having dinner
but
http://pastebin.ca/599977
the delete function does not work properly
its a runtime error
we ain't answering if yer leaving - come back later and deal with the post AND a question - at at once.
thanks PoppaVic
i will be back soon
bbl
It might be nice if you defined "does not work properly" and what the runtime error is.
indeed
we should give *some* credit. he did manage to open a web browser, paste his code, and then fire off a question in his irc client. now he is eating dinner while we figure out the problem. quite efficient.
http://rafb.net/p/kioYtA33.html What does #if 1 mean?
it means "compile the code between here and the next #endif"
and the #else ?
it never gets compiled?
Well, the *corresponding* #endif. There could be others nested
Correct
you can NOT treat ##C as a replacement for at least K&R. It's just wrong in many, many ways
K&R ?
look at the preprocessed output to convince yourself. gcc -E ( if you are using gcc )
ok, so basically this is the same as if the author used /* */ to comment out parts of the code?
The author is probably trying to offer an easy way to build the code in two distinct ways. If you change "#if 1" to "#if 0", the meaning is reversed
ok thanks
Also, it's good practice to wait a few minutes after I give an answer to make sure it's not corrected by a more knowledgable person
;-)
how do remove a dynamic pointer v? i must do free(v); v=NULL; or the sentence v=NULL; is not needed?
It's always good (IMHO) to set a pointer to NULL after free()ing it
findeton, it's not needed, but it is a good practice to assign it to NULL so you won't re-free it by accident later on
if (v != NULL) { free(v); v = NULL; }
although calling free() on a NULL pointer is a NOOP.
calling free on an invalid pointer is where things go poopie
ok thanks Beket
some people also use 0xdeadbeef instead of NULL :p
(j/k)
I've noticed that folks seem to forget that local-scope ptrs are not really required to zero, but when you dick with ptrs you pass-around or are global - they get totally screwed
oops
sorry if i offended someone
but my father was fuming
so i had to go to dinner
so
erm
http://pastebin.ca/599977
Nullset, you enter key appears to be broken
this is the code
sup?
Hello
The delete function is not working properly
well, when you get older its worse - THEN you end up having to cook it, serve it, and clean it all up as well
good
ok
so what? Before I load it I'd also like to know about the error and where and why
I am not much good with C, so i somehow managed to make this with the help of tuts :p, when i run the code and make a list of nodes
suppose i create a list
1,2,3,4,5. Then if i delete the node 3, it deletes the second node
I'd use glib - and do. Since I did all the primitive homework decades ago
I dont understand why it does
glib??, i am on windows using devc++
well, strike 2 ;-)
strike ??
the ones complement ~ must to "flip" the bits , no ?
I would heartily recommend never mixing NODE+PAYLOAD
C is zero-based. that was your third strike ;-P
kantor, when did 'no' become a question?
yes
because
are you familiar with debugging?
~4 is -5 ??
Nullset, i suggest to make another Abstract Data Type called Position
or simply pos
Your list is not for random access
he doesn't understand why his code is broken
ot I must to use the %p or %x format
where is the line where crashes
i have made some of that lists
in a "list" zero-based should not be an issue, just a counter. Nullset you need to think it thru based on our comments.
lists(nodes(payloads)) - that's it, man
Nullset, have your list a header?
amen
and KISS
You can always add new goodies to home and yard, but you can't always reach them if you get overcomplicated
i need to encode a day-date into a uint16_t any ideas of a good format?
number of days since "epoch" ?
365 days per year; months are 12; days w/i month is variable.
More precisely 365.2425.
calendar shit will kill you - it's not even universal: churches and whatnot fuck it all up
vorpal, im thinking that too, but will it fit into u16 ?
mind you, that 16 bits is not going to give you a very large range
'spose i could invent my own epoch!
bad idea
The new unit of time is the Sneff -- the exact running length of an original copy of Saturday Night Fever.
It's currently being standardized by the ISO.
Directors Cut version?
this is why there is an issue. I'd formalize and use a string-of-fields.
I am so goddamned impressed with the ISO so far.
not
i control the producer and consumer of this value, and it goes no where else, so i guess i can justify my own format.
I personally use "Y*.M*.D*:HH:MM[S]"
:HH/.HH
i think i've figure out what to do.... into a u16.. bits: yyyyyyymmmmddddd ((2007-1970)9) | (125) | 31;
trekkie stardate detected
_Umi_, im using a u16 not a float.1
it works.. Finrec in the service uses very similar
and 'm' is never more than 2 chars
days is also never more than 2 chars
y*.mm.dd.hh:mm[:ss]
if we have an unsigned int, then -1 is 0xFFFF right?
someone&Ritchie?
didn't you get told to get a book?
!k&r
k&r is The C Programming Language, 2nd edition, by Kernighan and Ritchie, http://cm.bell-labs.com/cm/cs/cbook/ - be sure to see the errata as well, at http://cm.bell-labs.com/cm/cs/cbook/2ediffs.html
no
wikid any advice for a c++ book while im at it
is -1 0xFFFF...FF ?
stop guessing at shit. Get a book, read it and do the exercises.. On several platforms
platform-dependent
Why are you assigning -1 to an unsigned int, anyway?
that's what the original code does
I want to translate that into Delphi code... which doesn't allow -1 to be assigned to unsigned int... so I'm guessing it should be 0xFFFFFFFF
well, bits is bits.. But it's sorta' silly
bonjour (hi !)
why, I think it's the best way to get FFFFFFF
ask the delphi folks - they made the bed you are lying in
Why not just assign 0xFFFFFFFF?
I guess in Delphi it would be max(Cardinal)
Does delphi not support int literals?
that's why I asked if -1 is 0xFFFFFF... I wasn't sure
what if I don't use 32 bits or 2's comp?
True. The first thing to do is to define exactly what it is you're trying to do.
yeppers - and WHY
Are you using the unsigned int to do arithmetic or to store bit patterns?
store bit patterns
Then I recommend using literals that map to the patterns you want to store (for initialization)
I'm just translating code from C to Delphi... I don't want to change anything in the original code... can I just get a yes or no answer to whether uint32 aaa = -1 will produce 0xFFFFFFFF ?
also _where_ are you expecting the translations.. The preprocessor? The compiler? The runtime?
(this is a lot like _when_)
You can't just blindly shoot literals out and expect everything to be portable.
is there a possibility that there is a platform where -1 in unsigned int won't produce FFFFFF ?
of course there is
which platform would that be?
The minute you get silly, some clown will have an issue
Hey, is this a safe thing to do?
no, i mean, this program should only run on windows XP etc.... I don't need ultimate portability...
char *s;
GNU makefile question (since I can't seem to find a make channel); why does the following not match?
OS := $(strip $(shell uname -o))
ifeq ($(OS), "GNU/Linux")
well, if yer doze-only, yer in the wrong channel
!win32
win32 is try #winprog on EFnet
doon't ever assume that. What happens if Microsoft is deemed illegal tomorrow?
sprintf(s, "%.8s", s);
^ is that safe or will fubar sometimes/always?
wtf did you expect that to do?
Section 6.3.1.3.2 covers the conversion of signed ints to unsigned
another of those cases where I wish you could just post an url
what does %.8s do?
ok forget it, I'll just assume Microsoft WON'T get deemed illegal and -1 will actually return 0xFFFFFFFF... just like it will on every computer that isn't a mobile phone or the Satun trinary computer
better question is "where did you think it went?"
prints the first 8 chars of s
C doesn't care if you want to be an idiot.. Where is your buffer?
http://www-ccs.ucsd.edu/c/lib_prin.html acoording to this
-1 becomes UINT_MAX
what, that line with 'urk: ' was directed at me?
!book yuriks
thank you Pryon
yes
trying to coord bad fingers in the cold
UINT_MAX is not necessarily 0xFFFFFFFF, though
my book is at home
It's only guaranteed to be 16 bits wide
well, we don't replace it
PoppaVic, do you know if somebody solved the problem of Nullset?
and I don't remember K&R talking about if that messes up or not
you _must_ be a virgin.. Where is the buffer?
UINT_MAX is probably equal to Max(Cardinal) though
ok, so it doesn't works?
how is it working for you?
I'd be more comfortable in your situation if I figured out what the code was actually doing and then doing that in the language of choice.
I assume this is illegal too? strcpy(s, s + 8)
people bother me
I'm debugging someone else's code, I don't know how it works, yet at least
You have to keep chanting to yerself "well, they all end up mulch" tooo often
i think that is the answer http://pastebin.ca/600082
Pretty sure arguments to strcpy() shouldn't overlap
what I thought
Soorry guys, there was a power cute in my area and my battery backup is like 0 seconds
cute == cut
Nullset, http://pastebin.ca/600082
I had a problem with my delete function
q-link-info == data , what does this mean
?
its confusing
Didn't you write this?
No i never used something like q-link-info
what part is confusing?
Nullset, means the data of the next node from q
i used q-info
glib does LL and nodes are not payloads.
Okay. What does q-info mean?
the info in the next node
Then, what does q-link mean?
no
i mean
Nullset, i know, but you must to look in behind the node you want to delete
q is a pointer
Nullset, and q-link is also a pointer
maybe thats why it was deleting one node earlier then i wanted it too
soryy, is a pointer too*
I seem to also recall yer not using a zero-based counter
Nullset, Where are you from?
India
My english is not that good
Nullset, are you interested on learning spanish?
[ot rant]I want to stab whoever invented Pascal and thought that user defined bases for arrays were a good idea[/ot rant]
learn*
Niklaus Wirth
(probably spelled incorrectly)
well, I am intrested in learning C
Nullset, i have the implementation and the definition of a double linked list in C
but is in spanish
lol
spanish code xDDDDD
Scream and cry all day - somewhere else.
I read a lot of tutorials, linked list is confusing
Nullset, i know
q-info is the info of the node pointed to by q
buy a book
how would you write if(!a)a=b?c:d; in spanish-C?
:P
I have like 4 books on C
(with the reverse ! and ? xD)
They are all confusing
Adra`Away: there is no "spanish C"
I have deitel and deitel
PoppaVic:
but is in spanish
I really think that was a joke
:3
pointers in C by an indian author
i don't see why code written in spanish would influence comprehension xD
Let us C and C in depth by two different indian author
life sucks - put away the video-games, movies and tv
and like 5 ebooks
on C
I am just too stupid
Adra`Away: yer comprehension is already an issue
lol
Adra'away, you must know that the names of the variables have to be descritptives
buy K&R
read K&R
I have K&R
xD
whoa, like, echo!
its language is difficult
so READ it, Nullset
wait
and get a dictionary
Maybe i should read linked list from K&R
anyways
are you a robot for your humor to be so low?
Adra'Away and that means that you must to write the name of the variables in a languaje that you understand
and, absolutely no programmer can live w/o a thesaurus
is it possible to do int(4.5) in c?
i will check the del function
good thing I already knew C when I read K&R, goddamn, that translation and editing was so awful
Adra'Away and the comments are in your languaje too
(int)4.5?
meaning the same thing as that
Adra`Away: humor? I'm still trying to puzzle out your repeated use of "xD"
this webpage says it is
oh; no idea
but i've never seen it
there is no "del" function
that's a C++ thing
sorry, it's a bad irc compulsive behaviour, driven by 10 years of pointless IRC chatting
well, aixo wrote one for me PoppaVic
its actually delnode
:p
Nullset, the linked lists is my favourite Abstract Type Data
not freenode? *g*
Nullset, ask me what you want
haha
"randomly linked lists... can you find your way out?"
thanks for the support :o)
It works now
I got what i was doing wrong
I was looking from behind but deleting the node one behind which i wanted too
now i get why you did q-link-info
Thank you very much
I am still confused, but i will manage on my own until i have some other big problem i can't around.
Thanks for your help
and thanks to everybody else who helped
http://www.pastebin.ca/600118
shouldnt it listen on port 8555?
hello, is there a way to return a char[100] in a function?
Judge--: You probably do not want to return a pointer to an object that has gone out of scope
Judge--: try typedefing it
Judge--: No. You can return a struct value, or a pointer to (the first char of) an array.
Judge--: Or a pointer to an array.
for (i = 0; i MAX; i++) { printf("%s", function(i)); }
Judge--: So, return a char pointer.
I'm not that familiar with pointers
Judge--: Where's your C book?
I'd better download one
ok
tks
Judge--: Get a good one instead; check the wiki.
ok
http://www.iso-9899.info/wiki/Books
re c maniacs
rehifoo
yihoo .. first commit with rapidsvn .. too good to be true : )
book? books? where?
what does the ^ operator do? Specifically, what is this: cbpy ^= 0xF;
everywhere ... no ?
hmm.. dunno' - I just came back downstairs and saw our usual "read a book".
Bitwise exclusive OR
Some folks seem to believe they are as rare as iridium
you mean the usual RTFM
well, the FM is little use w/o a lot of book/read/test under a belt
thanks
ya welcome
not wrong
this is why folks cry here.. They never learned what a book is; where or how to get one; when and how to use them, etc
laught out loud ..
or cry out loud
same-same
If the current commercials and programs/movies are an indicator: more parents need to beat the livin' snot outta' their kids and restrict their "pleasures".
..not to mention _caring_ wtf they do in school
well .. school is mostly bullshit learning .. lowering the level of everybody
..he _knew_ all those teachers.
no, only federal and tenure issues
...
yer there to LEARN to learn.
yop .. they should also learn the PLEASURE to learn
I only ever trouble for being a dick/stupid in class, or failing to pay attention, or learning-to-learn
yes
ever [had]
they test you out.. and THEN they take their fury off to school/teachers.
uthey test you out.. and THEN they take their fury off to school/teachers./u
yeah
yes
shouldnt it listen on port 8555 http://www.pastebin.ca/600154?
or.. yer ass ends up at the woodpile and you REALLY get yer ass lit up.
brb - recycle
What's 0x10 doing there?
&addr is incorrect.
line 15: why an array?
line 23: missing end of program
Also, you might consider checking the return value of socket()
my goodness! Why?
ENFILE
for one
while (i--) { ... } then in the first loop, the original value of i will be used, and only AFTER will it get decreased, right?
C doesn't say whether i is modified before or after.
The result of the post-decrement operator is the value before its operand is decremented.
int i = 1; if (i--) { ... } Normally that `if' will be `if (1) { "i" is now zero }'
yeah, so if at the start i = 5, and I type out the numbers in the console, i would get 5,4,3,...1 right?
more book-issues
int i = 1; printf("%d\n", i); usually `1' will be printed.
err, printf("%d\n", i--);
I don't know if this is garaunteed, but that's the idea.
usually??
lol
c'mon you know what i mean... int i = 5; while (i--) printf("%d", i); this would print out 54321
No, it wouldn't, csaba
No.
no?
pwned
:P
It would print 43210
`i' has already been modified before its next use.
really? so i is decreased before entering the loop code?
because i is decremented AFTER the while()
It's really not that hard to understand...
while(i){i=i-1; prinf()}
you mean simple, disposable tests taking less that 10 minutes?
s/10/3/
ok
But yes.
What does the -- operator do?
decrease the number
well, I was allowing for an OPEN book next to them and _reference_ ;-)
haha
so what would (--i) { printf(...) } do?
What does your program print?
It decrements its operand.
will it print 43210?
I actually believe folks spend more time on learning to use their ipod, cellphone, slipstick or hairgel.
No, it won't compile.
lol
I never really understood it
Right, the '...' isn't valid syntax.
int i = 5; while (--i) printf("%d", i);
Compile it and run it and see.
int main(void) { int i = 5; while(--i) printf("%d", i); return 0; }
Adra`Away mentioned this. while (i--) {} is like doing while (i) { i = i - 1; }
There. Total spoon-feed
I've got a tool called a "speed-square" for construction.. You can't use one blind and stupid, and it's got more features than I ever needed. And it's a bit of cast aluminum.
Such is the way of the smartass :/
what does it do?
There's no reason not to use a for() loop for enumerating integers anyway.
Adra`Away: you can get an immediate 90/45-degree check, plus roof-pitches and angles.
is while(i--) equivalent to for(i=some_number; i0; i--) ?
what does your program tell you?
also a dandy tool to beat in the brains of some idiot
neat :3
i like the last option
poking someone in the eye is cool too Oo
I agree
no
for(i=some_number; i=0; i--) ?
Adra`Away: easier to let them bang two hammer-faces together and get the spalling, and then sue - and win - against manufacturers
lol
Adra`Away: that was "real" - my brother in law did exactly that.. I was pretty disgusted
dude, i-- is a POST decrement. The value of `i' is decremented AFTER the expression. That's all you gotta know
If I tried to bang two hammer faces together I'd likely end up bashing myself on both sides of my head
You only need to know 1) the execution order of the while statement; 2) the execution order of a for statement; 3) the semantics of --
wow, pretty incredible stuff
i guess it can only happen in the USA...
It might be decremented "before". There's no way to tell.
oh, hell.. you and I would prolly mash a thumb
here, in Switzerland, the courts would laugh at you
The result value of the -- operator is the value before its operand is/was/will be decremented.
yes that is what i know... and i don't understand how while (i--) { printf("%d", i); } would print out 43210 and not 54321
Adra`Away: well, remember too: we actually saw a court-case where folks spilling scalding-hot coffee in the lap won.. Lawyers and judges are.. Just barely tolerable - like intestinal worms.
Write out exactly what that code does. It should occur to you
You keep forgetting to initialize i.
i'd be afraid to be an engineer there
let's assume that it si initialized
Walk though the code. int i = 5; while (i--) printf("%d", i);
Adra`Away: shooting an assailent in the home is liable to get yer ass in jail too.
What happens first?
first, we check if i != 0
we see that i = 5, which is not equal to 0
then we print out i
which is 5
Adra`Away: lawyers and judges are very, very weird.
You're skipping a few steps
and then we decrement i
No, the while expression does not care about the value of i at all.
Why do you think that while (i--) is testing the value of i? It isn't.
i can already imagine, a thief being caught getting money for moral and physical damage...
hi people, i have a silly question which is confusing the hell outta me. suppose i have the following statement: a = printf( "abc" ) + printf( "def" ); why is the output "abcdef". i mean why is printf( "abc" ) evaluated before the other one? Does it have to do with associativity? i'm scouring
K&R for answers but am not sure if associativity is the answer...
what do you mean it isn't?
it's checking if it's 0 or not
It is testing the value of (i--) which is a different thing altogehter.
No, it is not checking i at all.
doing so will add up the RETURN VALUES of the printfs in a
ah man... i'll jump out the window
What if it read like this? while (foo(i))
anyone have experience building Berkely DB?
but it will printf their content to STDOUT when they're called
Adra`Away: dude, the surviving crook - or his family, (and certainly the State) - will persecute yer ass.
it would still read the value of foo
K&R should tell you the evaluation order of the arguments of operators
haha
Would you still say that while (foo(i)) is testing the value of i?
to concatenate strings, use strcat() functions
-s
except foo(i) would be equvalent to --i and not i--
Adra`Away, i'm not trying to concatenate strings...
Adra`Away: it's almost safer to wax them forever, and then make them disappear.
What? I haven't said what foo does.
lol
so, what's the problem?
i = i - 1
Anyway, assuming foo() is a function and not a macro, it cannot modify i.
a = printf("abc") + printf("def"); will give you a = return value1 + return value2
If foo() is a macro it can do anything. But ignore foo(i) now, and let's talk about i--
whilst printf-ing stuff
(i--) is a C expression.
Pryon, umm...how is a expression normally evaluated? my rusty memory tells me that the operands are pushed onto a stack and then popped off one by one and the operator is applied...
All C expressions have a type and value.
Pryon, is that only for expressions in postfix / prefix representation?
What is the value of (i--) ?
uer confusing returns, arith-on-return and operation/function
brb
i-- returns the value of i, and then decrements i
No, that is not correct.
i begin to realise that he was asking why "abc" is printed first and not "def"
if i = 5, then j = i-- will make j == 5 and i == 4
because C uses a binary parsing tree for operations
i-- returns i, then decrements - period.
Yes, that's right.
Adra`Away: yeah, folks get strange
Adra`Away, binary parsing tree...ok i'll look it up
C is infix
i don't know WHY on earth would one want to sum the return values of printfs ~_~
But the order of operations is not defined.
Adra`Away: I can imagine.. Just not like that
Actually, the order in which the operands are evalutated is undefined (according to V1 of K&R)
may i recommend you read a book on Compiler design
PoppaVic, yeah i realized that later :P
Adra`Away, i've done it a LONG time ago so i forgot :P
implementation-defined generally it's a binary tree parse
sent= printf(); sent+= printf(), etc
So, while (i--) is not testing the value of i at all, it is testing the value resulting from applying the -- operator to i
ok can you just tell me, what can i convert while (i--) into, if I only write while (i)
Pryon, the one i have has operator precedence and associativity
Adra`Away: I understand the distinction, but the text uses the word "undefined" :-)
probably because it's pre-standard and "undefined" had not aquired its current meaning
while (i) { i--; printf("%d", i); } does this do the same as while (i--) { printf("%d", i); } ?
folks need to be seriously careful about clusterfucking this "operator" and "precedence" crap
Pryon, you're confusing me. Is it left to the compiler to decide which expression to evaluate first?
yes, basix
Yup
Pryon, or is it defined?
It is up to the compiler
hmmm
as a RULE, it's left-right lexing, and right-left for args: and all of that is just about moot
I was mistaken (this happens INT_MAX times per day)
right-left for args?
on x86?
Pryon, Adra`Away, my K&R says the associativity for + operator is left to right
But grouping order and evaluation order are two different things
Adra`Away: C-calling-conventions
i repeat, it is implementation-dependent :P
In some cases, one operator may not be evaluated at all
heh, on MIPS it is all at the same time
Adra`Away: I'd 100% doubt it
s/operator/operand/
Adra`Away, i'm totally confused now...what is the meaning of associativity??
I've been around too long to get overly concerned
do you remember basic math and algebra?
PoppaVic, yup
communative, associative...
foo(a,b,c) may be "addui r5, 0, 2, addui r6, 0, 3; jal _foo; addui r4, 0, 1" in mips
you mean commutative and associative?
infix is an accident waiting to happen
parens become your friend
PoppaVic, what does K&R mean by associativity is from left to right for the + operand?
anyway, as long as you're in C, and you manipulate field/ring-types, it's fine to say that a+b = b+a
PoppaVic, does it mean that it will always be evaluated from left to right? or as Adra`Away says its compiler dependent?
you'd need to read it, mine is vq and packed away.. I'd EXPECT it means they "associate"
it means that + will take stuff on its left as operand1, and stuff at the right as operator2
operand2*
don't confuse C with infix and algebra - C is predicated upon the others
a + b - c evaluates as (a+b) - c
C is pretty much stuck with infix for these things.. So, learn to love parens or rely on what folks all agree is precedence.
Adra`Away, so it necessarily doesn't mean what order they will be evaluated. it just means that they will be OPERATED UPON from left to right?
right?
no
well, yes
sorta'
:P
anyway, learn LISP, then come back to C
as a rule, C is lexing left-right
ummh...guys i'm trying to clarify a big debate here
it does NOT "parse" or "resolve" left-right
lexing... mmmm
it is not specified in standards how it evaluates the functions inside built trees :P
it generates a TREE and evaluates it
one person says that a = b + c; will always have b evaluated first and c evaluated next. whatever values they generate will then be added and stored in a.
is he correct?
and the tree evaluation is implementation-dependent
in general, YES
Adra`Away: I'd recommend seeing the ansi-C .l/.y and such - it ain't pretty
who cares?
the order of *evaluation* of operands is not defined by the language
associativity != order of evaluation
but there is no rule which says it _must_ evaluate b before c...? right?
right
i did gave me a headache, and i never touched lexx/yacc files again
Adra`Away: worse: it ignored the cpp entirely.
"undefined by the language" or "implementation-defined"
so....some compiler may evaluate c before b and still give the correct result?
lol
thank you
both
"undefined by the language" therefore "implementation-defined"
:P
In this case, yes :-)
^^
heh
Hmmmm. Is "undefined behavior" undefined by the language?
lol
okie....where will i get a reference of this? I mean what source can i quote which says "undefined behavior" or "implementation specific" ???
do you mind explaining me the right-left parameter evaluation? i'm curious
I was trying to come up with an example of something that's undefined by the language yet not implementation-defined
www.iso.org
bool type? :P
okie
what i am i doing wrong with these functions?
http://rafb.net/p/UFDyEB17.html
Adra`Away: l-r tells C what it will expect, but it stores them in a call R-l
Adra`Away: C99 - sort of :-)
depends on what your friends will accept. K&R will probably suffice if they're reasonable
would you give me an example on printf("%s", foo)? :3
"here is what I want".. Oh, that's nice: I'll prepare "R-"
Pryon, K&R doesn't say anywhere that its implementation specific
In my version (V1), it says that order of evaluation is not defined by the language.
Adra`Away: I'd have to cogitate it all and write it: try it with gcc -E or whatever.. it's.. illuminating on multiple platforms
k
you ever use the comma-operator?
"Order of operations is not defined by the language. The compiler is free to evaluate such expressions in any order, if the compiler can guarantee a consistent result."
i am using system to create a file in the first one and then if i want to see if it was created then i get an error so i have to make these changes but does not work...
http://msdn2.microsoft.com/en-US/library/2bxt6kc4(VS.80).aspx
PoppaVic, yeah...infact i just got my doubts cleared on that
well, it's painful - and rightly so.
Adra`Away, where where where
http://msdn2.microsoft.com/en-US/library/2bxt6kc4(VS.80).aspx
middle of page
after the operator table
The section on Expressions (section 7.0 in V1) says, basically, that for operators of equal precedence, order of evaluation is undefined.
Adra`Away: about?
"The compiler is free to evaluate such expressions in any order, if the compiler can guarantee a consistent result." :P
Pryon, okie
praise unto Bog and rpn or parens
how do I remove the \n from my strings? (they were read with fgets)
Interestingly, it also says, effectively, "parens be damned" for operators of equal precedence
microsoft is not a good guide to follow, but it's better than an IRC log as proof to unbelieving people
then it doesn't properly use parens, or the author didn't ;-)
In order to force a particular order of evaluation, temp variables must be used to store intermediate results
Judge use strlen() -1 and then put in that position '\0'
Adra`Away: back to "rtf{bm}" and TEST IT - several places.
lol
it's - to me - yes, cheaper to use temps.
wooha, the msdn web pages just got a new look!
Sorry, the "parens be damned" only applies when you're using an associative *AND* commutiative operator.
if you can't do it, by hand, yer fucked; if you can't type it in yer cute lil' calculator, yer fucked.
(from what I understand)
ahh
wow, gcc -E gives a real DUMP :P
mixing them
in the litterary sense
that's what it looks like, although I might not swear to it in court. I don't think I'm competent to guess what they mean
Adra`Away: yeah, there is another option I can' recall. Some are educational _about_ "what the fuck did YOU see?"
if i say int i=-2 and char c=i, what happens when i say printf("%c",c) ? is it even defined?
it's wrong
What does your test program do?
unless you understand what a "char" means between here and there
Adra`Away, thanks!
In my (notably narrow) experience, char is signed.
this little piece of code generate random characters when assign the value to a value that is lower that 0
it doesn't *need* to be, though
and i might truncate, too
*generates
well, shit.. what did you expect? see fprintf and %c
you told it what to expect
you set what it expected to something silly
ok, just as i expected, thanks for your kind answer
Hmmm. According to the man, the int argument to %c is converted to unsigned char
yeah, and the sign bollixes it
well, it still prints characters. random characters. and most of them are in the extended ascii table list
but i don't know how does it go and find them
they are not going to be "random"
characters like ÿ
(that is if c=-1, actually)
yer speaking of mapping
what happens if i create a file using system() and then i want to read it in the standard way?
I get the same output every time
I beat yer ass with bamboo?
Whay happened when you tried it?
yer entering the zone of unicode, utf-8 and such.. Mapping
it gives me an error
care to be more specific?
ok
http://rafb.net/p/UFDyEB17.html
that was my try to fix the error
okie...one more question...comparing floating point numbers using the == operator is stupidity or what? i mean technically the program will compile and run but its madness to use a == to compare two floats cuz the result of such comparison will always be unstable, right?
fp is an issue, because base-2 is the media, and base-10 is the meaning
You want scaling, rounding, floor, ceil, etc
fclose( NUll ) // not good
PoppaVic, if someone says float f = 0.3; if( f == 0.3f ) ....; else ....; isn't it a wrong thing to do?
as long as yer fp is is _integer_ left and right, sure - they are comparable.. If one side does some math, god only knows wtf near-value is the result.
vorpal, where is that happening?
that code would be ok, because that float value never leaves the register.
PoppaVic, exactly my point
line 16
yeah, it's not remotely pretty - and newbies/dozers can't understand it at all
zap0, but what if that f was calculated and NOT initialized manually? my point is 0.3 could also be 0.300001 in the register
ah ok
right, basix
then it would be 0.300000001 in the compare too.. your right about thte calc stuff, the moment *any* calcuation occurs on the float, the results are not =='able
my bottom line always was: "How were you taught to use fp in school, by hand, on paper?"
fix that, recompile, run, and paste the new code and output at rafb.net if there is still a problem
zap0, so if f was compared with a precision of 2 digits after the decimal point then it would be sanity else i dont know
PoppaVic, yeah by hand on paper
ok thanks
:P
exactly.
the presision would be dependant on the rounding rules.
PoppaVic, i mean that guy makes a point that the addition of 200.3 + 350.4 can evaluate to 550.7000017 and then says its alright to compare f to 0.3
I would usually generate a string. and then diddle it.. BUT, what do you (the kid with the paper and pencil) need-to-know?
yeah
also, you should get in the habit of checking the return value of calls to library functions.
right
and my calculator can give me 10 digits as well, but my tools are only good to .001 or 1/8's or whatever
hello
right
http://rafb.net/p/tXaYxa88.html - it says me that i must declare "actual" at line 55
but i am declaring it at that line
so, you fall back on WHAT do I need to know? WHAT is stored? WHAT do I want. HOW dod I get there.. Plus tool limits, etc.
can anybody help me, please?
no.. I can't read it.. Learn english for code.
:/
Yeah, life is like that
but code hasn't got much text
If I wanted to relearn chem, folks would laugh at me.
if I wanted to learn physics, folks would look at me and rotfl
lista is a type and a variable in your code. You should not name both the same
thnx dindinx ^^
that's because lista isn't a type
make it a "Nodo"
thnx, i think it's solved ^^
gee, was that a "node"?
yes
well, that's why code should be english ;-)
maybe but my teachers are spanish
and ask code written in spanish
"english" is a sponge.. It is an eclectic collection of nouns/verbs/pronouns/adverbs/adjectives.. YOu can express whatever you want in it.
Even asking here, in ##C suggests a basic grasp
COMMENTS, yeah.. I can see those being local-language (although I dunno why).
could someone help me with socket? http://www.pastebin.ca/600280
sorry, just noticed your answer#
hi. i got a pointer to an int-array. how can ich check how many fields there are in the array?
ich?
you can't
daoof...
warum nicht?/Why not?
a pointer is the same as "here there be dragons"
lol?
- has no bearing on the length of the block, let alone the array
ah ok
but thats sucks
well, C is no more than a portable-assembler.
if you want more info, learn about structs or param/args
no, thats enough for the moment
but thank you
sure, but it isn't enough - really
PoppaVic, how do I input to a char*(Cstr)?
no idea what a Cstr is, this is ##C
PoppaVic, cstring aka character array.
nope.. I won't guess at C++
How is that C++?
aka
Also Known As(AKA)
I know how to inout and output what *I* use, and where. I have no idea what you are doing, or think you are doing
inout/input
I am trying to read a "string" into a char*.
well, good luck - a ptr is a ptr
see the wiki?
there are ways and ways, depending what you mean/want.
PoppaVic, if you mean the home page, then yes.
well, review it
Okay, thank you PoppaVic.
sure
It's nontrivial when you add in extra issues
anyway..I guess I shall call it a Knight - stay well, folks.
thanks a lot ppl for your help!
OK; did you fix it now?
well, not really. i posted the version i have now is in last link
uwell, not really. i posted the version i have now is in last link/u
Ooo, Vertical Epic 777
line 17: PF_INET instead of AF_INET, I think.
prec, where did you get the worm from?
line 18: fix this magic number: 0x10
line 19: also handle the error?
line 35: also do something with the socket?
line 31: are you sure you don't care about the peer address? Does accept() even allow NULL for its second argument?
hi all, i'm not friendly with gcc compiler, so i need some tips to compile a simple source but i think i have some problem with the linker .. compiling gives me ( undefined reference to `SSL_library_init' ) but i included the library that should be seen by the compiler since it's in my
/usr/include path ... btw, compiling without linker give me an out that "cannot be executed ( binary file )" ... i'm unger gentoo linux, gcc 4.1.2 .. any tip ?
i also tried with gcc -l /usr/include or /usr/include/openssl/ssl.h but it says cannot found the libs :-S
you are seriously misinformed
thank you
litb, sry i know that
just need some point to start
man gcc
if you can suggest me something to read about to solve this ..
uif you can suggest me something to read about to solve this ../u
^^"
n0on3, do you know the path to your ssl library ?
Beket, yes, that's /usr/include/openssl/
and i tried give it with the -l but it didn't found it :-/
-L/hereputthepathofthelibrary -lherepaththelibnamewithoutlibanddotso -Ihereputthediroftheinterfaceheadfiles
n0on3, that's where the header files are. You should find the path to your ssl library files. This files should have an .so extension (so = shared object)
then point to them with the -arguments litb said
uhm.. ok thx guys i'll check the manual and your advices out
thx again
$(pkg-config --libs --cflags openssl)
that's all you need
thx again
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld: cannot find -l/usr/lib/libssl.so ?
-lssl
,
thx
:*
^^"
Or use pkg-config if you want.
The more i learn about C++ the more i'm tempted to use C .... however ... it lacks some functions that I still think usefull: for example templates ...
there, you should be able to use C now
you prefer to type the same class 5 times ?
yes
Just write C-style C++.
=P
That's what I do.
joshcryer:
If you write C you don't even have to write your class once
?
euu right
No classes in C
I'm trying to do C++ the good C++ way ...
what seems ... you can't do C++ things the C++ way in C++ ...
=P
That's not true, I've had a class in C.
euhh...
s/class/course/
object is just a way of coding
ya can do class too in C
how about virtual ?
of course .. inheritance and that kind of stuff is harder to make
c++ is nice ... but once you REALLY start using it's possibilities ... it start to suck ... increadibly hard
but simple class are doing able
quess i'll start mixing C with C++ from now on
and not try to make everything a function method .... it's doomed to fail ...
You could always choose a language that has all of the features you require
isn't there any other low level language ? that is compilable ?
name some ?
I don't know your requirements.
assembly
DammitCoetzee:
Why did you choose C++?
it has more + signs that C
lack of knowledge what happens if you start to expand
well bye people and see you later.
How is object C ?
D?
it sounds like a combo between C and C++?
common lisp!
No, it's a proper superset of C
Oberon? Haskell?
those compile and still allow low lever crap ?
common lisp is shiney tho, check it out... though it will probably make your head hurt
still has to be C compatible imo
Why do you need "lower level crap"?
access to speed if desired ?
dirty castig if desired ?
Oberon does. Haskell too, probably?
What does "access to speed" mean here?
the code should be able to be well compiled for differnt platforms ...
If your programs run too slowly, you probably need better design and/or better algorithms.
Qantourisc, most high level languages allow you to use C in places where speed is desired
Unless your writing embedded software or doing high performance computing, you generally won't hit optimization barriers.
s/your/you're/
i'm doing cpu costy stuff ...
Such as?
Are you doing it over a network or writing to a disk with any regularity?
mixing and resampeling
Have you put any thought into taking advantage of multiple CPUs?
yes
What are you using?
for what ?
the threading ? ... none yet ... i'm not using it yet
Hmmm. Somebody in #java asking for help on how to get unbanned from here
Btw what do you do in C if you desire a virtual thing ?
define "virtual thing"
Threading? Have you research any alternatives to threading for parallelism?
public Boo
C has no classes
How is that "virtual" ?
hence the question ...
i meant inharitance
inheritance and C are orthogonal
inharicotes? You don't like beans?
i don't nothing around Threading yet
Forget threading, I'm asking about parallelism in general. Would your system benefit from it?
yes
sorry maybe ...
Maybe you should use a parallel programming language. If you can find one.
depends if memory access speeds up due to this
it's simple to thread it it's not complex at all
threading != parallelism.
i'm compiling with GCC and getting "undefined reference to 'log'"
i've included math.h
The shared memory model is only one model of achieving parallelism, and it probably is not the best.
-lm
what is wrong with that one ?
prec, thanks!
http://c-faq.com/fp/libm.html
Contention.
prec, my bad
you cann still have seperated memory inside shared memory ...
hi guys! I'm getting crazy with a really strange result up to me. Please check this code: http://phpfi.com/246752 I really can't understand how it can print i = 4.... please help me
if ((cache[line].tag[i] == tag) && (cache[line].v[i] == 1)) = if someone in here increases i ?
int main(void) { puts("i = 4"); return 0; }
where's your book?
Someone? Eh?
%d\n", i);
what do you think is going to happen here?
ow lol
where can I learn to write simple C programs that read/write .wav files without a library?
ofcours silly
UB ?
prec??
i want to see if he/she can figure it out
What do you mean "without" a library?
I wanted to see some code that does things like read/write sine waves
Undefined behavior.
DoYouKnow, read() write() fread() fwrite() google for them, or read your C book.. wav file format is on the google too.
you look up the wav standard, you look read write
Is cache[line] defined?
Look at the source code for a wav-writing library
yes yes
Are you sure?
prec yes of course, that is just a piece of code
you need to learn about iteration operators and loops
What do you expect to be printed on line 10?
DoYouKnow, wotsit.org
andy i ì'm check what you said, it's interesting, i'm afraid not to have condiered that condition
prec, just a sec
what happens when the for-loop is being re-evaluated that the condition fails?
agr !!!! you are terribly right ! and this explain the strange behaviour!
bagr !!!! you are terribly right ! and this explain the strange behaviour!/b
ofcours he is right ... all hail andy
I didn0t considered the fact that for {} didn't found the condition
eheheh
it's okay... we've all been there...
finally maybe this is the solution of the mistery ehehehe, and damn, it's was so obvious :-/
many many thanks guys!, many thanks andy!
you're most welcome
:d
i go back coding, c ya later
prec, where did you get the worm from
--.
arragant worms?
What worm? Where am I?
who are all you people and what are you doing chatting on my terminal?
uwho are all you people and what are you doing chatting on my terminal?/u
Get off my LAN! /accent
what the.... hahahaha
hehe
we now return you to ##C
you can do inheritance with C too
gtk is the best example of it
s/do/simulate/
all object oriented language simulate inheritance, if you want