15,552 Topics

Member Avatar for
Member Avatar for sinkingships7

Does anyone know a good way to do it? I've heard of itoa(), but it's non-standard and isn't included by default with the GCC compiler. If you believe that's the best way, how to I get my hands on the function? Ideas? HUGE EDIT: I made a stupid mistake and …

Member Avatar for sinkingships7
0
116
Member Avatar for kuratkull

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 …

Member Avatar for kuratkull
0
298
Member Avatar for zubermohammad

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 …

Member Avatar for Salem
0
102
Member Avatar for plike922

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 …

Member Avatar for Ancient Dragon
0
88
Member Avatar for flipjoebanana

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 …

Member Avatar for Ancient Dragon
0
97
Member Avatar for kv79

Hi all, I have a sample.bat file . I want to execute that file 10 times . I dunno command that executes bat files .

Member Avatar for Narue
0
119
Member Avatar for RaDeuX

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; …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for perfectlover09

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, …

Member Avatar for Ancient Dragon
1
224
Member Avatar for flipjoebanana

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() …

Member Avatar for dwks
0
245
Member Avatar for java_girl

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* …

Member Avatar for dwks
0
122
Member Avatar for nnhamane

Is there any inbuilt function in C language by which one can directly access image contents?

Member Avatar for dwks
0
256
Member Avatar for fddrummer06

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 …

Member Avatar for fddrummer06
0
123
Member Avatar for zubermohammad

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 …

Member Avatar for Salem
0
79
Member Avatar for edouard89

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 …

Member Avatar for edouard89
0
108
Member Avatar for nikhil.laghave

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: …

Member Avatar for ArkM
0
235
Member Avatar for trowa0830

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 …

Member Avatar for Aia
0
286
Member Avatar for nikhil.laghave

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, …

Member Avatar for nikhil.laghave
0
261
Member Avatar for pdk123

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

Member Avatar for Prabakar
0
190
Member Avatar for kzdev

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? …

Member Avatar for kzdev
0
105
Member Avatar for Anbuvengeance

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 …

Member Avatar for Anbuvengeance
0
88
Member Avatar for jirving

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 …

Member Avatar for Adak
0
128
Member Avatar for virtual008

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 …

Member Avatar for ArkM
1
256
Member Avatar for shankhs

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; …

Member Avatar for ssharish2005
0
124
Member Avatar for Crushyerbones

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 …

Member Avatar for Crushyerbones
0
95
Member Avatar for jayee_spicyguy

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 …

Member Avatar for Ancient Dragon
0
79
Member Avatar for soultrav

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 …

Member Avatar for Narue
0
147
Member Avatar for kzdev

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 …

Member Avatar for kzdev
0
80
Member Avatar for C++masterinneed

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 …

Member Avatar for Ancient Dragon
0
95
Member Avatar for QuartzZapphyre

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

Member Avatar for ssharish2005
0
95
Member Avatar for mancode1007

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 …

Member Avatar for ssharish2005
0
116

The End.