@# Quotes DB     useful, funny, interesting





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



Comments:

<0> that's the normal procedure everywhere
<1> i did an amizon.com used deal
<2> ok
<2> for exemple..
<2> b = strchr(letter, used_letter[15]);
<2> is ok?
<1> your args are backwards
<1> c-bot tell [ArKaNgE] about strchr
<3> [ArKaNgE], here you go: strchr - #include <string.h> char * strchr (const char *string, int c) Search Functions (ISO) see - http://www.msunix.co.uk/manual/glibc-2.2.3/html_chapter/libc_5.html#SEC77
<2> ok
<2> string and char
<2> :|
<2> lol
<2> if continuous, I will not have any more a hair tomorrow
<1> c-bot index
<3> winkey, here you go: index - #include <string.h> char * index (const char *string, int c) Search Functions (BSD) see - http://www.msunix.co.uk/manual/glibc-2.2.3/html_chapter/libc_5.html#SEC77



<2> if(strchr(used_letter, letter) == 0) work?
<1> [ArKaNgE] 0 would be NULL
<1> strchr returns a char pointer
<2> ok
<2> :|
<0> that would tell you the character was not found
<2> i want the caracter found or not...
<0> strchr returns a pointer to the first character found
<2> ok
<2> whit null it is possible?
<2> with*...sorry for my english
<4> if the letter is *not* found, strchr returns NULL
<2> ok
<4> So if it's found, it's != NULL
<2> good
<2> thanx
<2> is WORK
<2> :)
<2> if(strchr(m6300_lettre_utilisee, m6300_lettre) != NULL)
<4> well done
<4> and goodnight
<2> good night hehe
<1> geeze you should see what the hardcover in great shape costs
<1> ok ordered it again c-dreamer
<1> i might get it this time
<1> or they could run it though a shredder first
<1> used to paying 2 bux for a hardbound book at the humain society thrift store
<1> http://www.rafb.net/paste/results/l8HcnK70.html
<1> whats wrong with this i must be missing something simple
<5> What are the symptoms?
<1> the gcc output is on the page
<1> at the top
<5> probably because select_t appears to be an int.
<5> At least on the man pages Google is showing me.
<1> c-bot select_t
<3> winkey, stop smoking crack and ask again.
<1> then why does it work for the other functions
<1> the structure is also pasted
<1> on the page
<5> Well obviously it isn't using the structure, or it wouldn't be giving the message. :O
<1> umm why would it use it in the previous function in the file
<5> Try it with a . rather than ->, and tell me what error message you get?
<1> select_t * st,
<1> its a pointer
<5> Yes, I know that. But humor me.
<1> not structure or union
<1> bahh
<1> what the heck hgappened between functiona and b
<1> all i see is commets
<1> ok
<1> i forgot the &(...) in the "then" case of the if's
<1> there we go
<1> silly winkeys
<6> c-bot, i love you!
<3> tehkevn, the magic 8 ball says... better not tell you now.
<1> can you append 2 enums together?
<1> i am not likeing this at all one module has to have too much stuff related to another
<5> In C, enums are just plain old integer values, so I'm not sure what you mean by appending them together.
<1> well
<1> add new vaslues to the end later on
<1> in anothe module



<5> No.
<5> As in the library ships with 50 enumerated values, and you want your own program to resume where they left off. And then when/if they add another 10 items to their enum, you want yours to automatically bump up ten as well? Nope.
<5> There are other (somewhat annyong) ways to build #define chains, those might be more what you are looking for.
<5> annoying.
<5> But nothing stops you from making your own enumeration that starts where the other one left off. enum myEnum { first = theirEnum.LastItem, second, third, whatever, LastItem };
<5> I don't know how common it is, but it seems that everywhere I worked where we used C we always had a well-known token for the last item in an enum.
<5> oops. theirEnum.LastItem isn't C. Use the well-known token from their last item. :-)
<1> so enum myenum {thelelastitem, a,b,c};
<1> if thelelastitem is 10 then a will be 11?
<1> mayby i should go back to #define
<5> Not quite. You can ***ign a value to an enumerated value, and all later entries will follow it in order.
<5> enum myenum { dontuseme = theirlastitem, a, b, c };
<5> then a = theirlastitem+1, b = theirlastitem+2, c = theirlastitem+3.
<5> And they're all just simple integer constants.
<1> then the problem is what enum do you use when you have 20 of them
<5> the important part to notice about that list is the ***igned value. By default it starts at 0, but you can ***ign them to be whatever value you want, even duplicates of other values.
<5> enums are just constant integer values. It is no different than saying: const int a = 1; const int b = 2; const int c = 3; ...
<1> you can't add to the same one though it has to be a new one you add theres into?
<1> its a little foggy too when you add typedef into the works
<5> you cannot add to their type. A type can be defined at most once. If you are adding to it, you are trying to define it a second (or additional) time.
<5> In C, think of an enum as a convenient way to list a bunch of const int values.
<1> and you cannot remove a type correct?
<5> er, sequential const int values.
<1> yea i #define flags
<5> There is no difference between { enum foo { a, b, c, d, e }; ...} and { const int a = 0; const int b=1; const c = 2; ... }
<1> a 0x01 b 0x02 c 0x04 etc,,,
<5> Nothing at all prevents you from continuing that list elsewhere, beginning at f.
<5> But you have to give it a new name.
<1> a new name means more than one function arg would it not?
<5> Nope.
<1> like stuct a is not struct b
<5> Unlike other languages where enums have special properties, the identifiers in an enumerator list are constants of type int, and they can be used anywehere that a constant int is used.
<5> enums are not structures.
<1> so don't typedef an enum then?
<5> I don't know if that's possible, but I could look it up.
<1> thern just use int for the function arg
<5> yup, just use an int.
<1> i ***ume the compilers are smart enough to not whine
<5> 6.7.2.2, Enumeration specifiers. ... "3. The identifiers in an enumerator list are declared as constants that have type int and may appear wherever such are permitted."
<5> They are just ints.
<1> if they were defined in a header files, not includeing one of the headers would give you different values though
<5> no, they would simply be undefined values and give you a compiler error.
<1> i think i need to go back to the chalk board
<1> with the eraser
<5> Good luck on it. :-)
<1> i am trying to do this hook thing
<1> when something happens it parses a linked list looking for a function to handle it
<1> but i am trying to make it so new things could be added at runtime
<1> dlopen
<5> There are normal conventional ways of doing that, you know.
<1> besides a linked list of a struct with int type and a function pointer
<5> An event chain (A calls B, B calls C, C calls D) works well until somebody breaks the rules and breaks the chain. A bunch of listeners maintained by the system and called in the 'proper' order with appropriate error and crash handling is another.
<1> yea but i don't want to even be foircerd to have to use C
<5> Hooking using interrupt chains used to be a very important skill in programming.
<5> Is this for Windows programming?
<1> no
<5> Then they'll be fine with C.
<1> it could be the program just receved a sighup or it could be that a min in time just p***ed
<1> or some other event thats added to the rules after the program already was running
<5> So it's just the normal event listener pattern?
<1> hu?
<1> truthfully i wouldn't know what a "event listener pattern is"
<5> The listener patterns. A bunch of things say "I want to be notified when this happens", optionally given a preferred order and optionally with the ability to terminate the event.
<5> http://en.wikipedia.org/wiki/Observer_pattern
<5> It goes by a lot of names.
<1> hrm that artical mentioned glib
<1> btw wikipedia rocks too
<1> and yes thats what i am after
<1> but i was trying to define the event with an int
<5> This one might also be close to what you are doing: http://c2.com/cgi/wiki?ChainOfResponsibilityPattern
<1> HOOK_HOUR or HOOK_SIGHUP etc...
<5> Another description with source: http://c2.com/cgi/wiki?ObserverPattern
<5> The big difference between the patterns are if you want all of them to be called when the event happens (sighup or timer or whatever), or do you want them to stop the progression once it has been handled?
<5> If you want it to stop, use chain of responsibility. If you want any interested party to know about it, use the observer pattern.


Name:

Comments:

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






Return to #c
or
Go to some related logs:

archivos vng
#linux
#linux
japain manifacturer
No Match for argument: php.ini yum
globelines smtp
linux find files updated
#linux
#chatzone
evii irc



Home  |  disclaimer  |  contact  |  submit quotes