alt.comp.lang.c
  Home FAQ Contact Sign in
Your Ad Here
alt.comp.lang.c only
 
Advanced search
May 2008
motuwethfrsasuw
   1234 18
567891011 19
12131415161718 20
19202122232425 21
262728293031  22
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
alt.comp.lang.c Profile…
RELATED GROUPS

POPULAR GROUPS

more...


 Up
  TAG Heuer replica watches - Fake Watches         


Author: Precision Replica Watches
Date: May 12, 2008 00:12

no comments
  Allocating a pointer?         


Author: saneman
Date: Apr 30, 2008 06:03

In the below code the last call to myprint does not work (gives a
segmentation error).

But I thought that pointer variables local in main (or any other
function) would first be deleted when the calling function returns. Why
does it give a segmentation fault?

#include
#include

void myprint(double* a) {
printf("number is = %%f\n",*a);

}

int main() {

/* Working! (static allocation) */
double d1 = 1.1;
myprint(&d1);

/* Working! (dynamic allocation) */
double* d2 = (double*) malloc(sizeof(double*));
*d2 = 2.2;
myprint(d2);
Show full article (0.72Kb)
29 Comments
  Length of Strings in an Array at compile-time         


Author:
Date: Apr 29, 2008 05:41

How do I find the length of strings within an array at compile time?

The following is not safe:

const char* MyStrings[] =
{
"one",
"two",
"three",
"end marker"
}

#define StringLength(index) MyStrings[index+1] - MyStrings[index]

Since the strings may not be placed consecutively, or in order, within
memory.

Also

#define String1 "one"
#define String2 "two"
#define String3 "three"
Show full article (0.65Kb)
5 Comments
  Floating-Point Constant with Payload         


Author: Jon Sargeant
Date: Apr 19, 2008 22:14

Hi,

I'm looking for a general purpose way of initializing a floating-point
constant with an arbitrary bit pattern using C99. For example,

const unsigned int x=0x3f800000U; //assume 32-bits
const float y=*(float*)&x; //assume 32-bit single-precision IEEE754

Compiling this code on GCC generates the error "initializer element is
not constant". C99 hex floats are a partial solution. I can enter
plus/minus zero, finites, infinites (using 1.0/0.0 and -1.0/0.0), but
NaNs have me stumped. How do I get a constant NaN with a specific
payload? nan() looked promising until I realized that it returns a
variable. Any ideas?

Thanks,
Jon
15 Comments
  726 bloqueador veicular sem mensalidades - http://bloqueadorgsm.vilabol.uol.com.br 7260226878060806336002134         


Author: bloqueador sem mensalidade
Date: Apr 4, 2008 14:49

Bloqueador veícluar com tecnologia gsm - Sem mensalidades

Tenha toda segurança para seu carro com um preço justo.

Apenas R$ 299,00 ( sem mensalidades )

http://bloqueadorgsm.vila.bol.com.br/

Compare e Compre.
Rastreador de Veículo
Rastreadores de Veículos
Rastreador GPS
Rastreadores GPS
Rastreador Ituran
Rastreadores Ituran
Rastreador Portátil
Rastreadores Portáteis.
Assistência 24 Horas

Visite agora mesmo nosso site.

http://bloqueadorgsm.vila.bol.com.br/
Show full article (0.98Kb)
no comments
  86762106 Bloqueador gps gsm - localizador gps gsm - sem mensalidade - alarme automotivo , alarme para carros 867621060487708         


Author: bloqueador sem mensalidade
Date: Apr 1, 2008 16:56

Bloqueador veícluar com tecnologia gsm - Sem mensalidades

Tenha toda segurança para seu carro com um preço justo.

Apenas R$ 299,00 ( sem mensalidades )

http://bloqueadorgsm.vila.bol.com.br/

Compare e Compre.
Rastreador de Veículo
Rastreadores de Veículos
Rastreador GPS
Rastreadores GPS
Rastreador Ituran
Rastreadores Ituran
Rastreador Portátil
Rastreadores Portáteis.
Assistência 24 Horas

Visite agora mesmo nosso site.

http://bloqueadorgsm.vila.bol.com.br/
Show full article (0.93Kb)
no comments
  Datenstruktur fuer Filter         


Author: Hans Posch
Date: Mar 4, 2008 01:39

Hi

Ich sollte einen Datenfilter implementieren und dazu liegen die Signale
als File vor. Abhaengig vom Parameter N, nehme ich nun jeweils N
aufeinanderfolgende Signalwerte und bilde aus diesen den Mittelwert um
den entsprechenden gefilterten Wert zu berechnen. Danach verwerfe ich
das älteste Datensignal und nehme den naechsten Wert im File und
berechne den Mittelwert erneut usw.

Die einfachste Sache die zu loesen, waere wohl das gesamte File in ein
Array einzulesen, das ich ja dynamisch allokieren kann. Danach kann ich
mit 2 Schleifen jeweils den Mittelwert bilden. Waere es vielleicht
besser nur ein Array der groesse N zu haben und dort dann immer das
erste Element zu loeschen, die restlichen N-1 Elemente um eins nach oben
zu ruecken und dann einen neuen Wert ins Array lesen? Braeuchte wohl
weniger Memory ;)

Danke fuer Tips!
1 Comment
  my sister having sex with her boy friend         


Author: yenc
Date: Mar 1, 2008 10:42

PORNOLATION RELEASE
no comments
  Re: recursion (?) through a directory tree         


Author: MikeC
Date: Feb 29, 2008 12:57

If this is on the DOS window of a PC, try looking at the help for
findfirst() and findnext(), which give example programs that can be twisted
to do what you want.

Another function is ftw() {file tree walk}, which is designed to do exactly
what you want. There is a good example program in the help files.

If you are using RHIDE, enter Alt-H for help, C for C- help, A for
Alphabetical list, and run down the list till you get to the entries
mentioned.

MikeC
Show full article (1.00Kb)
2 Comments
Your Ad Here
  Re: Book for a beginner         


Author: Sarason
Date: Feb 26, 2008 07:21

Daniel.C wrote:
> Hello,
> What book(s) should you recommend for an absolute beginner ?
> Regards.
> Daniel
>
>
I have a heap of C and C++ books, as I am teaching myself. the one that
makes C clear is "A Book on C" by Kelley and Pohl. For C++ for C
programmers by Pohl.

Both books are thin ,have simple worked examples for every thing that is
taught and are not turgid like a lot of C Books and references.
no comments
1 2 3 4 5 6 7 8 9