comp.lang.c.moderated
  Home FAQ Contact Sign in
comp.lang.c.moderated only
 
Advanced search
November 2007
motuwethfrsasuw
   1234 44
567891011 45
12131415161718 46
19202122232425 47
2627282930   48
2007
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.c.moderated Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  comp.lang.c FAQ list Table of Contents         


Author: Steve Summit
Date: Nov 1, 2007 03:00

Archive-name: C-faq/toc
Comp-lang-c-archive-name: C-FAQ-list.toc
URL: http://www.eskimo.com/~scs/C-faq/top.html

[Last modified July 3, 2004 by scs.]

This article is a table of contents for the comp.lang.c frequently-asked
questions (FAQ) list, listing the questions which the abridged and full
versions of the FAQ list answer. (Both lists answer all questions; the
wordings of the questions in this article are taken from the abridged
list.)

If you have only just come across this article, you will naturally be
wondering where the lists which it indexes can be found. The unabridged
version is normally posted to comp.lang.c on the first of...
Show full article (30.21Kb)
no comments
  comp.lang.c FAQ list Table of Contents         


Author: Steve Summit
Date: Oct 1, 2007 03:00

Archive-name: C-faq/toc
Comp-lang-c-archive-name: C-FAQ-list.toc
URL: http://www.eskimo.com/~scs/C-faq/top.html

[Last modified July 3, 2004 by scs.]

This article is a table of contents for the comp.lang.c frequently-asked
questions (FAQ) list, listing the questions which the abridged and full
versions of the FAQ list answer. (Both lists answer all questions; the
wordings of the questions in this article are taken from the abridged
list.)

If you have only just come across this article, you will naturally be
wondering where the lists which it indexes can be found. The unabridged
version is normally posted to comp.lang.c on the first of...
Show full article (30.21Kb)
no comments
  sizeof and character arrays?         


Author: lisp9000
Date: Sep 20, 2007 22:15

I was wondering the best way to define and loop through a character
array. Most lines of the file I am processing are 80 characters long
but when an error occurs in the client which created the log sometimes
they can be much longer so what's the best way to determine the array
and define it?

char s[80];

vs

#define MAX 100
char s[MAX];

and

int i;
for (i=0; i < sizeof(s); i++) { printf("%%s", s[i]);)

I can read each line of my log file using fgets, now should I use
fixed arrays like:

char s[80];
FILE *fp;

fp = fopen("foo.txt","r");
fgets(s,sizeof(s),fp);
Show full article (1.06Kb)
2 Comments
  Parsing?         


Author: lisp9000
Date: Sep 20, 2007 22:15

Hi,

I am writing a log parser (beginner in C) and have some questions.

There are 2 types of log files which are very similar:

Type 1:
117: SYSTEM->P0 Welcome to the server
444: Z1->P0 Greetings
812: SYSTEM->EVERYONE "Chumly" (P0) was kill #5 for "Dragon
Master" (Z1)
954: P0->TEAMORANGE Help me!

Type 2:
Welcome aboard Chumly! 00:03:40
00:03:41: Qualax-5->TEAMORANGE Qualax-5 destroyed by "Dragon
Master" (Z1)
Blaster missed!!! 00:03:53
00:04:06: P0->TEAMPURPLE Help Needed at Zorcon-8

So in Type 1 there is always an integar indicating relative time
prefixing every line and in Type 2 there is always a 24-hour style
timestamp but sometimes it is prefixed and other times suffixed.
Show full article (1.79Kb)
4 Comments
  A question about '=='' in C++!         


Author: Guofu Chen
Date: Sep 20, 2007 22:15

Can anyone tell me the different between
(1)
int i, j;
i = j ==1;
cout << i;
cout << j;

and
(2)
int i, j;
i = j = 1;
cout << i;
cout << j;

Why the result of (1) is

0 0

while the result of (2) is

1 1
Show full article (0.46Kb)
18 Comments
  Arithmetic expression fitting algorithm?         


Author: Icebeing
Date: Sep 20, 2007 22:15

Hi all,

Some time ago, I got hit with this problem on a game-programming
test, and it's bugged me ever since:

The program has 2 inputs:

1 32-bit integer, called result
1 input string of digits

The algorithm calls to construct an arithmetic expression string from
the input string so that it evaluates to the result value, by
inserting '+' and '*'

example:

input 1 = 44550
input 2 = "8888225"

algorithm spits out: "8888+22*5"

the algorithm spits out "" if no arithmetic expression can "fit" input
2 with input 1

best approach i could come up with is a brute-force method...any math-
heads know a better approach to this?
my number theory is rusty lol
Show full article (0.92Kb)
6 Comments
  Re: 0xFFFFFFFF & 0xFF == 000009F7 what is the deal with this bitwise?         


Author: Richard Tobin
Date: Sep 20, 2007 22:14

In article plethora.net> you write:
>printf ("result=%%ul",0xFFFFFFFF & 0xFF);
>
>output:
>result:2551 ---> 000009F7

Always cut-and-paste programs and output, instead of retyping them.

Your output is in fact "255l", with a lower-case L at the end, not
a one. You probably meant %%lu. And are you sure that 0xFFFFFFFF & 0xFF
is an unsigned long on your platform?

-- Richard
--
comp.lang.c.moderated - moderation address: clcm@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line. Sorry.
no comments
  Re: open source C obfuscator tool?         


Author: apm35
Date: Sep 20, 2007 22:12

On 4 Sep, 18:13, ta0k...@yahoo.com wrote:
> On Aug 21, 5:29 pm, ap...@student.open.ac.uk wrote:
>
>> I know this is a FAQ but the FAQ entry is out of date, IMO. It refers
>> to obfus, shroud, or opqcp. obfus is the old name for the commercial
>> Stunnix obfuscator, shroud is the Gimpel s/w one that seems to have
>> disappeared and I can find no reference to opqcp. So I wonder if
>> anyone knows of any open source C obfuscator please?
>
> I don't have an answer for you, just a comment. It's my guess that
> most open-source developers don't have an interest in code obfuscation
> because that is essentially the opposite of open-source. Its main use
> is to make code unreadable when there is no other choice but to
> distribute it in source code form, and is meant to prevent concept
> copying...
Show full article (1.63Kb)
no comments
  Re: open source C obfuscator tool?         


Author: apm35
Date: Sep 20, 2007 22:12

On 4 Sep, 18:13, Ark Khasin macroexpressions.com> wrote:
> ap...@student.open.ac.uk wrote:
>> I know this is a FAQ but the FAQ entry is out of date, IMO. It refers
>> to obfus, shroud, or opqcp.
> Take a look at Snob (http://www.macroexpressions.com/snob.html)
> It is not open source but free for non-commercial use.
> It is very basic but it does the job well.

Thanks, this is just the sort of thing I was looking for. I think it
should be mentioned in the FAQ.
> Your email is broken

Replies should always be to the newsgroup, not by email. Besides, if
that email worked it would be harvested by scumbags and deluged by
spam.

-Andrew Marlow
--
comp.lang.c.moderated - moderation address: clcm@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line. Sorry.
no comments
  errors with gcc         


Author: dapunka
Date: Sep 20, 2007 22:08

I've recently begun learning to program in C. I wrote this program
(file name c3.c):

main()
{
int count;
puts("Please enter a number: ");
scanf("%%d",&count);
printf("The number is %%d",count);
}

When I gave command gcc c3.c, I got the following warnings:

c3.c: In function 'main':
c3.c:5: warning: incompatible implicit declaration of built-in
function 'scanf'
c3.c:6: warning: incompatible implicit declaration of built-in
function 'printf'

but the file still compiled and gave the expected results.
Show full article (0.83Kb)
11 Comments
 
1 2 3 4 5 6 7 8 9