Yey it works now. Why do I need to include the header file if it's already included in audio.c which is one file in my project.
Type: Posts; User: subflood
Yey it works now. Why do I need to include the header file if it's already included in audio.c which is one file in my project.
Here is the original code
aud.h
/* Audio.c functions */
bool InitAudio(int freq, Uint16 frmat, int chann, int buff);
char * LoadAudioList(char * file_tracks); // The evil function...
I used the typedef approach and I still get the same warning however, if I try and compile your code everything works fine. The thing is that the program works the way it's supposed but the warning...
Hello, I'm having a problem with pointers that I can't figure out. It's hard for me to explain so I will show you the code and the problem.
calling function prototype:
char * LoadAudioList(char...
Thank you
I have a structure in a function declared like this:
struct audio ad;
and basically I need to return its address to the calling function.
First, should the declaration look something like...
ok thanks guys.
Gbrick is a 2d array.
Let me get this straight, if you read the first number in the file using fread and then you call fread again it will start from the seconds number in the file?
Hello, I'm trying to save a few numbers is a file and then read them back but I'm not sure If I'm doing this correctly.
What I want is this to be saved in a file in this format: 5...
I just looked throught my book about C and it was there, I can't believe I forgot this.
thanks guys
I always thought that when you declare a variable of a type struct it will automatically allocate the memory.
Here is the struct:
struct circle_t {
int x, y, r;
int color;
int xs, ys;
int dx, dy;
};
nope
I did have an if statement before the else if it's just that *cols = 2; was between the two.
Yea you are right. Why does it work like that?
sorry about that.
I have hundreads of lines before that piece of code. It compiles well if I just comment *cols = 2;
*cols = 2;
else if (!table[*rows][*cols]) {
table[*rows][*cols] = 1;
return...
What is a function that will wait x amount of milliseconds until it goes to the next line of code? What header do I need to include in my source file?
I'm on a GNU/Linux system.
thats the one i'm learning from
I had a few questions about ncurses and how it handles windows and colors.
I was practicing programming using the ncurses and I can't figure out a few things.
My first problem is when I make a...
i don't know what api to use myself. I just wanted something easy and fast.
thanks for the link to fmod I'll check it out.
How would I play an mp3 or any other sound format in a console app so that the music plays in the background while the program is still running normally like it would without any music playing? btw...
why not try and copy small chunks at a time?
again thanks man.
I use the strchr() function to find newline characters and replace them with the null terminator.
thanks itsme86!!
I have one problem though, how can I make sure that anything after 39 characters doesn't go to the input buffer? For example, the gets function would discard the newline...