comp.lang.c
  Home FAQ Contact Sign in
comp.lang.c only
 
Advanced search
February 2008
motuwethfrsasuw
    123 5
45678910 6
11121314151617 7
18192021222324 8
2526272829   9
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.c Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Earn from home         


Author: ragu
Date: Feb 29, 2008 22:25

Today, We are earning upto Rs.20,000 every month from internet
without working hard and spending only 30 min daily in the internet.
This Income is keep on increasing day by day.We are not joking. We are
not making any false statement. It's 100%% true !

http://earnmultimilliondollars.blogspot.com
no comments
  Earn from home         


Author: ragu
Date: Feb 29, 2008 22:22

Today, We are earning upto Rs.20,000 every month from internet
without working hard and spending only 30 min daily in the internet.
This Income is keep on increasing day by day.We are not joking. We are
not making any false statement. It's 100%% true !

http://earnmultimilliondollars.blogspot.com
no comments
  function         


Author: Bill Cunningham
Date: Feb 29, 2008 19:20

I have been having fits with this function.
Can anyone help me I think I need to use if and else if but I have rewritten
it and got errors. I want a conditional in this program a choice between 2
options and only one works. I don't think I need the strcpy either.

#include
#include
#include

main(){
char pass[10]="ded", pass2[10];
printf("Authorization ");
fflush(stdout);
fgets(pass,10,stdin);
strcpy(pass2,pass);
if(strcmp(pass,pass2)==0) {printf("success"); exit(0);}
else
printf("error"); exit(EXIT_FAILURE);}
73 Comments
  Re: function         


Author: Morris Dovey
Date: Feb 29, 2008 19:13

Bill Cunningham wrote:
>
> Ok. My goof. But if I wrote this.
>
> if (strcmp(pass,pass2)==0) {printf("success");}
> else printf("error");
>
> I can't figure out if and if else. I might need a little help with
> conditional statements involving 2 possbilities.

I'm assuming that you intended for the password to be "ded"...

#include
#include
#include

int main(void)
{ char pass[10]="ded", pass2[10];
Show full article (0.84Kb)
1 Comment
  Assigning stderr to another stream         


Author: Fred
Date: Feb 29, 2008 17:14

I start with a program containing

FILE *msgout;
void msgset(FILE*, int);
...
msgset(msgout, 47);

In msgset I have (abbreviated)

FILE *err_stream = NULL;
void msgset(
FILE *msgout,
int iact
)
...
err_stream = stderr;
msgout = err_stream; // Assignment here depends on iact.
return;
Show full article (0.49Kb)
4 Comments
  Stats for comp.lang.c (last month)         


Author: CLC stats
Date: Feb 29, 2008 15:06

============================================================================
Analysis of posts to comp.lang.c
============================================================================
(stats compiled with a script by Garry Knight)

Total posts considered: 3,277 over 29 days
Earliest article: Thu Jan 31 23:08:02 2008
Latest article: Fri Feb 29 23:04:03 2008
Original articles: 298, replies: 2,979
Total size of posts: 8,086,982 bytes (7,897K) (7.71M)
Average 113 articles per day, 0.27 MB per day, 2,467 bytes per article
Total headers: 3,596 KB bodies: 4,300 KB
Body text - quoted: 1,759 KB, original: 1,860 KB = 51.39%%, sigs: 666 KB
Total number of posters: 415, average 19,486 bytes per poster
Total number of threads: 354, average 22,844 bytes per thread
Total number of User-Agents: 50

============================================================================
Top 20 posters by number of articles
==================================================================...
Show full article (15.27Kb)
no comments
  How do I wind this into a nested loop?         


Author: Robbie Hatley
Date: Feb 29, 2008 14:29

Greetings, group. I've got a big MESS of code in one of the source
files of my employer's primary software product. It's basically
assignments of automatically-generated control-id macros to arrays,
so they can be easily accessed by nested for loops. This mess
looks like:

AuxChanId [0] [0] = IG1_CH1;
AuxTypeId [0] [0] = IG1_TYPE1;
AuxOperId [0] [0] = IG1_OP1;
AuxThreId [0] [0] = IG1_THRESH1;
AuxMinuId [0] [0] = IG1_MM1;
AuxSecoId [0] [0] = IG1_SS1;
AuxHoldId...
Show full article (1.73Kb)
7 Comments
  size_t         


Author: Ioannis Vranos
Date: Feb 29, 2008 14:20

Is it possible the following condition to be true under C95?

sizeof(size_t)> sizeof(unsigned long)
4 Comments
  WinAPI videos? how to play videos beside avi?         


Author: jon
Date: Feb 29, 2008 14:01

Hi, I was hoping someone in this section could help me with a C based
API that plays videos, all different kinds of videos. I have found
how to play .avi files, but playing other files seems to be a lot
harder. I know you must use codec's (unless i'm mistaken) and thats
where I get lost, but I think you have to use COM in it somewhere, but
it's over my head, could someone please help me??

Thanks in advance.
Jon
2 Comments
  calculating length of an substring         


Author: brasilino
Date: Feb 29, 2008 10:43

Hi Folks:

I'm trying to calculating a substring length directly from pointer
address, like this:

char *e = NULL, *s = NULL;
int len = 0;

s = strchr (url,'.');
e = strrchr (url,'?');
len = (int) s - e;

Since 's' and 'e' are pointers, I think that's can be make a math
over it, like 's++'.

Using gcc 4.1.2 (on glibc 2.6 and Linux 2.6.23) it points the
following error:

"error: invalid operands to binary -"

So, how can I calculate this length in a fancy way? I don't want to
loop through it.

thanks a lot in advance
Lucas Brasilino
9 Comments
 
1 2 3 4 5 6 7 8 9