comp.lang.c
  Home FAQ Contact Sign in
comp.lang.c only
 
Advanced search
January 2007
motuwethfrsasuw
1234567 1
891011121314 2
15161718192021 3
22232425262728 4
293031     5
2007
 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
  PlaySound funtion         


Author: Cogito
Date: Jan 30, 2007 06:41

Chaps and Chapettes,

Program in C++.

Im doing a project to detect a defined marker, then play the relevent
sound when it can no longer be seen.
It worked well when using the beep function.

if( config->//not visivle ) Beep(176,20);

But when I run with the code below it either plays the error tone
which suggests it can't find the file (even though its in the local
directiory) or it crashes.
if( config-> //not visivble ) PlaySound('test' , NULL, SND_FILENAME |
SND_ASYNC);

Any suggestions as to where my mistake is?

Thanks for your time.
no comments
  myfree(p)         


Author: temper3243
Date: Jan 30, 2007 05:21

Hi,

What is wrong with #define myfree(p) {free(p),p=NULL; }

Instead of free , i ask my users to always call myfree. Are there any
limitations with that .

Does it have any speed overhead because of assignment.

Someone (maybe gordon burditt) once said that pointers can be copied,
so it fails. I didn't quite understand that.
6 Comments
  How to improve this sort?         


Author: At_sea_with_C
Date: Jan 30, 2007 03:49

Hello all,

I have written an ascending sort routine for floats. This seems to do
the job, but for elements over 10,000, it gets awfully slow. A lot of
useless comparisions with previously sorted elements are made. I was
thinking of using a function, that kept an index, to selectively iterate
over unsorted elements. But I am unable to think of a way to do it.

Any ideas to improve the routine and get a better grade?
Thanks to all.

#include
#include
#include
#include

#define MAX_ALLOC 1000000UL
Show full article (2.52Kb)
7 Comments
  exp         


Author: yudav
Date: Jan 30, 2007 03:01

Hi,
i have a big problem with DSP..i have to write this equation in C
code, but i am a beginner for the C programming for DSP, therefore
writing in C code this equation is very hard for me.
the part of equation as shown in delta(t-to) that should be written
with lookup table.

exp(j*(pi/2-2*pi*f*delta(t-to)+phase(to)))

if you give me any suggestion, it would be very better for me..

best regards
1 Comment
  what do the values of "clocks ticks" and "CLOCK_PER_SEC" represent?         


Author: chandanlinster
Date: Jan 30, 2007 02:14

what do the values of "clocks_ticks = sysconf(_SC_CLK_TCK);" and
"CLOCK_PER_SEC" represent?
2 Comments
  C bit twidders ... I'm in need of a dose of clever.         


Author: user923005
Date: Jan 30, 2007 00:51

The purpose is for a shellsort.

I am experimenting with the increment for shellsort using a modified
version of Pete's driver and this bit of code (shell_ratio is a
floating point number for the time being during my search):

void ssort2b(e_type array[], size_t count)
{
size_t i,
inc,
j;
e_type tmp;
int inversion = 1.0 / shell_ratio;
Show full article (1.60Kb)
no comments
  Implementation of malloc         


Author: Raman
Date: Jan 30, 2007 00:34

Hi All,
Can any one tell me how to implement malloc.
Thanks and Regards,
Raman Chalotra
7 Comments
  for broderic: truly terrific money - keyyo ed - (1/1)         


Author: brodie
Date: Jan 30, 2007 00:24

I love the newsgroups.

Take a look, I know you'll love it as much as I do.
One thing I love about them, they don't keep log files of the news I read or files I download.
With some of the fastest connections around it's no wonder people love it and keep coming back.
Images, video, mp3 music, the real news from around the world... it's all inside waiting for you.

Blazing fast downloads
Posting allowed!
800 GIGS of new multimedia content each day
Streaming audio and video

The place to be? Is http://www.newsdude.net

Ihjumurrep. I iw erdobepsok
...
no comments
  Re: Mergesort algorithm for linked lists         


Author: Richard Harter
Date: Jan 29, 2007 23:32

On Wed, 24 Jan 2007 18:29:20 GMT, cri@tiac.net (Richard Harter) wrote:

[snip]
>function alpha (list L) returns list
> level = 0
> out = nil
> while (L)
> append beta(level,L) to out
> level ++
> end while
> return out

The line
append beta(level,L) to out
should read
out = merge(beta(level,L))

no comments
  Does this works         


Author: raghu
Date: Jan 29, 2007 21:41

Hello Everyone,

I have a doubt for a long time. consider a structure
struct A{
int z;
}
struct n{
struct A *a;
int *y;
}*st;
will this works
st -> a -> z = 10;

Thanks in adv
6 Comments
1 2 3 4 5 6 7 8 9