15,551 Topics
| |
Hey everyone. Glad to become part of this community and I hope I continue to come here for a long time seeing as this site gives great helps. My problem: I have a struct that is (for example) the following: [code] #define NUM 999 struct client { int id; char … | |
I have a debug assertion failed problem with akrip code. That code is downloadable from [url]http://akrip.sourceforge.net/simple.c[/url] I have add a new code to function RipAudio(...) where i want to add new folder and name the file to it. [code] void RipAudio( HCDROM hCD, DWORD dwStart, DWORD dwLen, int song ) … | |
How do I convert the characters in buffer to upper case? | |
[[U]I][B]My Doubly linked list doesnt work when i try to display using backward/reverse traversal... Will you please help me....[/B][/I][/U] [IMG]http://www.withfriendship.com/user/images/616/1vijay.jpg[/IMG] | |
Hi, [URL="http://www.webinmind.net/bpc.html#two"][U][COLOR="Red"]Someone told me to use this code to clear the input buffer..[/COLOR][/U] [/URL] [code]while((ch=getchar())!='\n' && ch !=EOF);[/code] But I fail to understand how it actually works. For example, there are two newline characters in the buffer [quote] [B][U]This is my buffer[/U][/B] \n \n [/quote] Now getchar() grabs the first … | |
[CODE=c] #include <stdio.h> #define M 21 #define N 2 #define INPUTFILE "C:\\Documents and Settings\\Duy Anh Bui\\My Documents\\Uni Stuff\\Eng Computing\\Sourcecodes\\Exercise 2\\in.dat" #define ARRAYFILE "C:\\Documents and Settings\\Duy Anh Bui\\My Documents\\Uni Stuff\\Eng Computing\\Sourcecodes\\Exercise 2\\array.dat" float Quadratic(float,float,float); //Quadratic Function Prototype int main () // Start main() { float a[M][N] = {0}; // Array a … | |
hi guys, it's been a while since i used c for anything so here goes a question tha may seem silly. I have 2 variable length arrays.... [code=c] int main() { int n = 5; int m = 6; int before[n][m]; int after[n][m]; array_function( 5, 6, before, after ); } … | |
Hi there I'm having a problem with gcc The code compiles just fine ,but it doesn't run I have a printf next to main but it doesn't even do that The code is supposed to be an http server ,implemented using Berkeley sockets ,but that doesn't really i just want … | |
I want to read file in binary mode using fread() into structure members. following is the code which works perfectly on Turbo C compiler(DOS base) but doesn't work for VC++ 6, it is giving exception at fread() statement. The input to this file we can give any .bmp file name … | |
Hello, I'm trying to use getch several times in my program, but it is remembering earlier key presses. Is there a function or command I can use to clear the getch buffer? Or am is there something else I am doing wrong? Thank you. C. | |
hai. I'm trying to compile a program split up across multiple files. The code is far from complete, but I noticed lots of compiler warnings and errors. This ought to be due to splitting the code up: I thought the preprocessor simply copy and pasted the code into main.c when … | |
Hello, Okay I'm stumped and can't figure out why this code chunk isn't working properly (works on square matrixs; everything else doesn't work).... uint8 * imageTranspose( uint8 *im ){ uint8 *im_transpose; int x, y, org_offset, tran_offset; int im_size = dims[0] * dims[1]; if ( (im_transpose = malloc(sizeof(uint16) * im_size)) == … | |
I have a quick question that is been bugging me. [CODE]void swap(void *a, void *b) { void *tmp; tmp = a; a = b; b = tmp; }[/CODE] I wrote this intending it to be either able to swap a structure, or just the data defined within a structure. Will … | |
Not certain if this is the right place to ask this. I need to get two processes to use the same data. Process 1 reads text files, parses them and creates linked lists (structures).before this process terminates it display all the lists to prove the data has been loaded correctly. … | |
So basically i got to make program where you can add rows, inside those rows numbers and count in each row and all rows pair number sum. This far im done and everything is working. Now part which don't want work. I need make option to make rows longer or … | |
Hi, This is my first post in this forum and it is a 'help me' post :) Anyway, I took a beginners class in C Programming and at the completion of the class we were assigned to do a project. The project is designing a billing system for a supermarket. … | |
[code]#include<stdio.h> #include<conio.h> #define MAX_ROWS 10 #define MAX_COLS 10 void add(int a[][MAX_COLS], int b[][MAX_COLS], int result[][MAX_COLS]); void displayValues(int(*)[MAX_COLS]); void diff(int a[][MAX_COLS], int b[][MAX_COLS], int result[][MAX_COLS]); void main() { int val; int i,j; int choice; int cols,rows; int operation; int table1[MAX_ROWS][MAX_COLS]; int table2[MAX_ROWS][MAX_COLS]; int result[MAX_ROWS][MAX_COLS]; clrscr(); printf("Press 1 to enter values for … | |
I have an assignment on currency I turned it in, and it is not right by no menas. I had no loops in any module, can anyone explain how to do a loop? | |
[CODE] #include<stdio.h> int main() { int i ,j ,a[5]; for(i=0;i<=4;i++) { printf("\n\tEnter the %dst value of the array: ", i+1); scanf("%d", &a[i]); } j = a[0]; printf("\n\tOriginal array entered by the user: "); for(i=0;i<=4;i++) { printf(" %d ", a[i]); if(a[i]<a[i+1]) { j = a[i+1]; } } printf("\n\n\tGreatest no. from the … | |
Hi all, i'm using Visual Studio 2005 and by mistake enable the arrows which represents tabs and dots with represents spaces when coding... How do i disable this? | |
I am wodering if i answered these correctly or not? Algorithm Verification Consider the following selection statement where X is an integer test score between 0 and 100. input X if (0 <= X and X < 49) output "you fail" else if (50 <= X and X < 70) … | |
Hi all I am using Dev-C++ . I want , when I press Tab to skip a 3 blank places instead 6 . Thank you for your effort of reading . | |
i'm trying to get random numbers in a loop like this [CODE=syntax]#include <stdio.h> #include <time.h> int getRand ( int a , int b ) { return a+rand()%(b-a+1); } int main() { srand ( time( NULL ) ) ; int i; for(i=0 ; i<6 ; i++) printf("%d\n",getRand(0,9)); return 0; }[/CODE] the … | |
I got this code here, i wonder why it doesnt put in the file "in.dat" in the same folder. [CODE] #include <stdio.h> #include <stdlib.h> #define N 20 //Number of trials void main(void) { FILE * pFile; float data[N][2]; int i,j ; char overwrite; for(i=0;i <= N ; i++) /* Initinalize … | |
I have to pass a string to a function that strcats something to it, in K&R I read to pass a pointer to it, but I don't know where to allocate buffer... Is there a difference betw passing an empty string or not? My printf starts with some strange symbols, … | |
Maybe my question is odd, or maybe already answered, but i didn't knew another way of searching a solution (the title i selected may get an idea of how weird is it) Its quite simple, i'm creating an application that has a command prompt, this is, like ms-dos the C:\>_ … | |
Hi, I've have a problem of printing data from stack, if it's simple words,then stack works just fine,but if I try to push changed data using function(Written by a very intelligent moderator :) ), I get just the same word n times: Intelect Intelect Intelect .... [code] #include<stdio.h> #include<stdlib.h> #include … | |
Hi All, Any sample program in c for file integrity check.. Regards, Nagaa | |
Hello all, I have been a member here for some time, i must admit this is my first post. I have read the posting rules, lets hope my title is considered "meaningful". i have no code snippet, yet. I have just hit a sudden wall in my heap programming. I … |
The End.