[Dev-C++] searching characters in a string newbie
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Patel, N. M <Nil...@qu...> - 2005-01-07 16:42:30
|
This maybe a easy one. But I have a string containing '|'. I need to write a little code where it search for '|' and returns whatever string is between the first '|' and the 2nd '|'.=20 Myabe this might be more clear. cat|dog|mouse|house. the cat, dog, mouse and house and not predefined. so i need a way where i can search for '|' and another '|' and return dog.= =20 i tried doing a method using find_first_of method, but did not turn out = correctly.=20 any suggestions=3F -----Original Message----- =46rom: dev...@li... [mailto:dev...@li...]On Behalf Of dev...@li... Sent: Thursday, January 06, 2005 11:14 PM To: dev...@li... Subject: Dev-cpp-users digest, Vol 1 #2282 - 2 msgs Send Dev-cpp-users mailing list submissions to dev...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/dev-cpp-users or, via email, send a message with subject or body 'help' to dev...@li... You can reach the person managing the list at dev...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of Dev-cpp-users digest..." Today's Topics: 1. Priority Defualt (Rhys Owen) 2. Re: Priority Defualt (David McKen) --__--__-- Message: 1 =46rom: "Rhys Owen" <ska...@ho...> To: dev...@li... Date: Thu, 06 Jan 2005 17:53:23 +0000 Subject: [Dev-C++] Priority Defualt Hi, I want to know how to set the default priority of a C++ program to=20 realtime (in windows). If you know how to do this, or want me to be more specific, please reply. Cheers ~ Roo --__--__-- Message: 2 Date: Thu, 06 Jan 2005 20:57:11 -0500 =46rom: David McKen <dml...@co...> To: Dev-C++ Mailing List <dev...@li...> Subject: Re: [Dev-C++] Priority Defualt I assume you mean how to have the program set it's own priority to the=20 real time class. The following is a snippet from some code I wrote. # define WIN32_LEAN_AND_MEAN 1 # include <windows.h>* ... * if(SetPriorityClass( GetCurrentProcess(), IDLE_PRIORITY_CLASS) =3D=3D 0) { cout << "\nError setting priority for process id #" <<=20 GetCurrentProcessId() << endl; cout << "Error # =3D " << GetLastError() << endl; } Look for the documentation for the constant for the real-time class. If=20 you want the rest of the stuff in windows.h then you can remove the lean=20 and mean define. hys Owen wrote: > Hi, I want to know how to set the default priority of a C++ program to=20 > realtime (in windows). > If you know how to do this, or want me to be more specific, please reply. > > Cheers > ~ Roo > > > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > --__--__-- _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users End of Dev-cpp-users Digest =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D The contents of this message, together with any attachments, are intended = only for the use of the person(s) to which they are addressed and may = contain confidential and/or privileged information. Further, any medical = information herein is confidential and protected by law. It is unlawful for= = unauthorized persons to use, review, copy, disclose, or disseminate = confidential medical information. If you are not the intended recipient, = immediately advise the sender and delete this message and any attachments. = Any distribution, or copying of this message, or any attachment, is = prohibited. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D |