Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail |
|---|---|
| NNTP-Posting-Date | Sat, 14 May 2011 09:01:36 -0500 |
| Message-ID | <4DCE8B46.A58@mindspring.com> (permalink) |
| Date | Sat, 14 May 2011 10:01:42 -0400 |
| From | pete <pfiland@mindspring.com> |
| Reply-To | pfiland@mindspring.com |
| Organization | PF |
| X-Mailer | Mozilla 3.04Gold (WinNT; I) |
| MIME-Version | 1.0 |
| Newsgroups | comp.lang.c |
| Subject | Re: I need help |
| References | <e279cb75-8a72-4ad9-9877-62a9ca1b0dfe@glegroupsg2000goo.googlegroups.com> |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| Lines | 34 |
| X-Usenet-Provider | http://www.giganews.com |
| NNTP-Posting-Host | 4.154.217.41 |
| X-Trace | sv3-6a749yiNs+Hhdxl95XVowAnRZjs0tlTuYnvFOM1NHzhbds2Z3EkJqZdHMM2zw2g0KoS2ifZlxdCDr19!89KiF/hnGyq+0UTL5M4wydgJHUHyxUoINDekeZnS0KMg2qq8UXNsDyq2Jcgsb27smgYucPRgRDag!zVbA3kky |
| X-Abuse-and-DMCA-Info | Please be sure to forward a copy of ALL headers |
| X-Abuse-and-DMCA-Info | Otherwise we will be unable to process your complaint properly |
| X-Postfilter | 1.3.40 |
| X-Original-Bytes | 1790 |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.c:3953 |
Show key headers only | View raw
janus wrote:
>
> Thanks you all.
>
> However, I have additional question ..
>
> Is this acceptable?
> char string[] = "Simulated Annealing = 857747716";
> char astring[] = "Karmarkar 625874153";
>
> char * value = strchr(astring ,'=');
> char * avalue;
>
> if(value != NULL){
> *(value ++) = 0;
> printf("%s=====%s\n", value, string);
> }
> else if((value == NULL) && (avalue = strchr(astring, ''))){
> *(avalue ++) = 0;
> printf("%s====%s\n", avalue, astring);
> }
>
> Is the above correct?
It's close.
I think you misspelled (astring, ' ').
And the (value == NULL) expression is pointless,
since you already know that (value == NULL) is true,
if that part of the code is executing.
--
pete
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: I need help janus <emekamicro@gmail.com> - 2011-05-14 06:02 -0700
Re: I need help pete <pfiland@mindspring.com> - 2011-05-14 10:01 -0400
Re: I need help Columbus sailed the ocean China Blue <chine.bleu@yahoo.com> - 2011-05-14 07:03 -0700
Re: I need help Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-05-14 10:19 -0400
Re: I need help Keith Thompson <kst-u@mib.org> - 2011-05-14 10:59 -0700
csiph-web