15,551 Topics
| |
Hello, I am having a problem with a Glut function which is messed up, either by GCC or by OpenMP. I have GCC 4.3.1 20080626. The problem is, that I do not know which of the three is causing the "Segmentation fault" at the glVertex2f() function. The proggie works perfectly … | |
hi friends i want to develope some software or any application using c but i m dont know what should i do because i dont have complete knowledge of it i just know upto the pointers and files and i m reading further about programming in windos and linux so … | |
I am trying to create a program that gets the min and max of a list. I so far have this but when I run the program and put in a list i get the max, but the min is 0 because you have to end it with zero. How … | |
Hello, Is there is a way within C to trap stdout and prevent it from displaying. In my example I call a function that has the potential to print an error message to stdout. Is there a way to prevent messages to stdout from being displayed while my program calls … | |
Hi all, I have a sample.bat file . I want to execute that file 10 times . I dunno command that executes bat files . | |
So for my assignment, I'm supposed to fill ten strings from a file using an array of pointers. Now I know I'm doing this wrong since my compiler is telling me that there are errors on the levels of indirection. Pointers are so confusing... >_> [code] char* pStrings[10]; char** pWalker; … | |
Hi. Im new to programming and to this website and i need help with one of my assignments. The instructions for the assignment are to "write a program that uses an array of student structures to answer inquiries. Using a menu-driven user interface, provide inquiries that report a student's score, … | |
Hello, I am having problem with strings within structs and was wondering if someone could help. I have a struct, i.e. [code] #include <stdio.h> #include <strings.h> struct feeling { char *emotion; char *emotion_options[20]; int num; }; [/code] which i then pass to a function via reference, i.e. [code] int main() … | |
Hi. The objective os to open a file and print 55 lines of content at a time. Since I am still learning 'C', my code (thus far) may appear slightly neophytic ;) [CODE=C] #include <stdio.h> #include <stdlib.h> #define SIZE 1000 void pause( void ); int main( void ) { FILE* … | |
Is there any inbuilt function in C language by which one can directly access image contents? | |
I'm working on a problem in the File Processing chapter of my C book, and I've run into a few problems. I'm sure they are probably minor but I've been playing for a while and can't figure out why they are happening. First: When printing a text file containing the … | |
hi friend i have a problem in coding a program it states that you have to take input of suppose ten players and their team with their batting average there may be all tn different team or any but less than ten and i have to sort them by their … | |
Hello everyone, I am having a problem with a function I am working on. It has to do the following: [quote]Outputs the null-terminated string pointed to by s starting at row row and column column, in a field of length characters. As with dtioCursor(), the row value 0 refers to … | |
Hello All, I am trying from a Fortran program, to call a subroutine that I wrote in C...I named the C code file as filename.c and the subroutine is: void filename() Now in a fortran program, I am calling this subroutine as: Call filename() I am getting the following error: … | |
hi i need some help in this program.. using only 1 for loop.. [code] #include<stdio.h> void main() { int n; clrscr(); for (n=1; n<=10; n--) { printf("\n %d",n); } getch(); } *the output of this program is" 1 2 3 4 5 6 7 8 9 10 but i need … | |
Hello, I am a new user to Daniweb. My regards to all. Well my C skills have taken a lot of rust and I am stuck at a small issue. I want to read a data file containing some information. Now I want to read 2 integers from this file, … | |
following is a simple embedded c piece of code, can somebody tell me is there a problem in it ? [code=c] boolean new(int a) { return !(a & 7); } [/code] i am new to embedded programming. It will be great help, any pointers to this ... thanks pdk | |
I want to make a function to pass and return values from the same arguments. For example prm3=0 after function's execution must become prm3=3, and next prm3=6, and next prm3=9 ... I wrote the following but it doesn't work. p1,p2,p3 are not passed to prm1, prm2, prm3. What is wrong? … | |
I have this program to add, edit, delete and view the student file, which is save as student.csv. The problem is that the only function that is working is the add and view. The edit and delete does not have problem on the code but it does not edit and … | |
i'm really having a problem on how to start my homework. this is regarding to my first post ([URL="http://www.daniweb.com/forums/thread132760.html"]http://www.daniweb.com/forums/thread132760.html[/URL]) thanks to the one who answered, i realized that i needed to use arrays on this. i realized that i needed to solve the problems manually, meaning that i have to … | |
I'm learning C and can someone tell me if I'm doing file input right? I know file and user input can be insecure because of buffer overflows. [code=C] #include<stdio.h> int main(int argc,char *argv[]) { FILE *file; char c; int lines = 1; if(argc == 2) { file = fopen(argv[1],"r"); if(file … | |
I am trying to implement edit string algorithm given in: [url]http://en.wikipedia.org/wiki/Levenshtein_distance[/url] in C and I am repeatedly getting "segmentation Fault" I dont understand why......:( Here is my code [code] #include<stdio.h> #include<string.h> int minimum(int a,int b,int c) { int min; if(a<b) { if(a<c) min=a; else min=c; } else { if(c<b) min=c; … | |
I am doing some self-made exercises lately to practice my C skills. One of them is something like this: Given a file with something like: "Peter Wilson the swordsman". I want to store "Peter Wilson" in the char array "name" and "swordsman" in char array "title". So far I've tried … | |
Header file which contains follwing code please help me [COLOR="Red"]#define X {{1,1,2,3,4,5,66},{3,2,4,1,5,0}} [/COLOR] X was used as a member to another Macro [COLOR="red"] #define Y {X,F,I}[/COLOR] like this F and I also defined in the same format as X My question is how to acess these elements because No where … | |
Hello! I am trying to make a program for string compression using LZ compression techniques, but the program is at the beggining - I fail to realise what goes wrong, but I think it is a problem with string operations. [code=C] #include <stdio.h> #include <conio.h> typedef struct comp { char … | |
The following is a visual basic code [CODE] dim Msg1(5) Msg1(1) = "xMessage1" Msg1(2) = "xxMessage2" Msg1(3) = "xxxMessage3" Msg1(4) = "xxxxMessage4" Msg1(5) = "xxxxxMessage5" For cnt = 1 To 5 Debug.Print Msg1(cnt) Next cnt[/CODE] How can I do the same thing with ANSI C? (Instead of Debug.Print can be … | |
i need to find a way to print the number of arguments --- example ---- ./a02 er t r child process : counts four argument ---- what the output is now ---- er ; t;r; and problem 2) how can i make a call to reader for every character----instead of … | |
i'm an 2nd year IT student i'm having a hard time understanding functions can anyone please explain to me in layman's terms what are functions,kinds of functionsand i would really apprieciate it if you could give me some basic function oriented program in C | |
Anyone please help me to find out ...where is the error because this program will continue untill the user enter 0 the program will terminate ...but i stuck at here please help... [ICODE]#include<stdio.h> struct student{ int id_no; char name; int average; int main() { struct student stud1; do{ printf("Enter Index … | |
I need to read parameters from a file called "params.c", the following is the codes which can read parameters from that file. But I am not totally understand. Hope anyone can give detailed answers. Thanks. In a file called "params.c" I have: [code=c] #include "systems.h" /* it includes all .h … |
The End.