15,551 Topics
| |
can anyone help me by telling how to save a diagram that ive drawn in C to a file? | |
I have a project that I am working on. This is basically an extension of that. There is this weird error (Seg fault) when I run this code. What makes this error weird is that I print the value stored in the pointer and in the next line I pass … | |
need a c program for calculating signal to noise ratio in wireless networks | |
Hello there, I have a set of variables that need to be overwritten onto a certain [U]row[/U] on an multidimensional array (char array[100][80]; ) of [U]strings[/U]. the variables are [U]integers[/U] and they need to be in the form [I]00:00:00,000 --> 00:00:00,000[/I] I don't know how overwrite the existing row and … | |
Hi, guys. I've been reading your forum for some time. Now I need a little help again. I am trying to read a bitmap file using BITMAPFILEHEADER, BITMAPINFOHEADER and RGBQUAD in windows.h - I need RGB values or only one of them. All the info in header structures is OK. … | |
Hi all, I'm helping my girl out with her hw, (/me not knowing C at all, but someone has to help, right?) I am supposed to read user input, and then try to execute a given command plus the arguments in every given $PATH. I managed it all, but I … | |
I need to use an if/else statement like the following in another program of mine, but for some reason there is a problem with it. The statement seems to work for all values, except when I enter the N_MAX value of 0.1. It should be considered valid, but it's not. … | |
hi i need a litle help.....i must write a program that search for a string in a text file and return the line in the text file were string was found...string its an argv....i wrote this code but it returns the whole text file when i search for something [CODE=c] … | |
how can i declare something like this? int main(int argc, char *argv[]){ char *users[] = {}; char *names[] = {}; openPasswd(users, names); return 0; } void openPasswd(char &users[] = {}, char &names[] = {}){ } as you see i want to populate the 2 char arrays from the function back … | |
| |
I know how to use the file_pointer=fopen("location","type") to open and check if a file exists. But I'm not sure how I would use this command or a similar one to check if a folder exists? What command do I have to use to check if a folder exists in the … | |
How to create Floating Components for a Software ? I would like to create something like a Shooting Object and a Target, which is in itself a Desktop App. What kind of API should I use to create Objects which are Discrete parts of the same App unlike Windows... Thank … | |
[code] #include<stdio.h> int m,i,c; main() { clrscr(); for(m=1; m<=10; m++) { for(i=1; i<=10; i++) { c=m*i; printf ("%d\t",c); } printf ("\n"); } getch(); } [/code] | |
N00B here. I need to reuse a function's return in other functions. The problem is that the function's return changes every time it is called. How to achieve this? [CODE]int FUNCTION1(void) { // do stuff return FUNCTIONRESULT; // return to be reused in other functions } int FUNCTION2(void) // <- … | |
Write a multi-module C program to manage an auto-parts database for a manufactory. help translate the bash script into c [code=script] #! /bin/sh #Project 2 CSC 3320 #echo menu test program stop=0 # reset loop termination flag. while test $stop -eq 0 # loop until done. do cat << ENDOFMENU … | |
Any one has an idea how to develop Header of GPRS tunneling protocol using C language or even has interest in something like that I am a professional C/C++ programmers living in jordan | |
So I've already got one function that takes a list of va_args, ..., and then formats it, like such [code=c] string form_string(string format, ...) { va_list args; va_start(args, format); ostringstream output(""); for (unsigned int i = 0; i < format.length(); i++) { if (format[i] == '%' && format[i+1] != '%' … | |
i have to write C code for linux commands wich , apropos ,whereis(for a linux mini shell)..... if someone can tell me how to start...or help me with some links... which - shows the full path of (shell) commands --i need that comand to show me only the path of … | |
can anyone help me doing my simple assignment,please. I feel fed up and got confused so far | |
bobsced0$ gcc -g -o prog ss.c bobsced0$ ./prog File size is:906984 Segmentation fault bobsced0$ gdb prog GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO … | |
hi..pls help me with this ...when i run this c program i get in result segmentation fault message (i run in ubuntu terminal): [CODE=c]#include<stdio.h> #include<utmp.h> int main() { char *s,*c; struct utmp *u; int i; c=getlogin(); setutent(); u=getutent(); while(u!=NULL) { if(u->ut_type==7 && strcmp(u->ut_user,c)==0) { printf("%-12s",u->ut_user); printf("%-9s",u->ut_line); s=ctime(&u->ut_time); for(i=4;i<16;i++) printf("%c",s[i]); printf("(%s",u->ut_host); … | |
Hi, I'm studying the basis of C, C++ and Assembly languages at my university (I have two exams about these subjects, for now) ... and I have a problem ^^. I wrote a program in C (not so optimized, this isn't our present goal for my professors) that recieves in … | |
1. command line program for match two string and also allow the character • * -- any number of character • ? – Single Character Ex.: I/p:- This is a string Th?s is *g O/p Both string are Same pls help me to solve this program in c | |
I need to generate and reuse a 5 digit random number every time my program is executed. But the following generates random numbers every time the function is called. [CODE]#include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <string.h> #include <time.h> int RANDOM(void) { int RANDOMNUMBER = 0; srand((unsigned int)time(NULL)); … | |
Hello guys! I have an assignment in my data structure class and I want to ask following thing: I have txt file which is unordered (not sorted) say like this: red apple blue sky white car handsome boy hello world My program should read file into linked list and sort … | |
My file contains: [CODE] Hook,Mark,In, , ,Tire,Matt,Out,01/01/2001,Mike [/CODE] My structure: [CODE] struct part { char name [NAME_LEN+1]; char owner [OWNER_LEN+1]; char status [STATUS_LEN+1]; char date [DATE_LEN+1]; char renter [RENTER_LEN+1]; } parts [MAX_PARTS], temp [1]; [/CODE] And the code: [CODE] FILE *fp; fp=fopen("parts.csv","r"); printf("%d", fp); //Added this for debugging char buf[100]; … | |
I've started on an assignment and just can't get it right PLEASE help! The assignment is :Write a program that will do the following: 1.) Continuously prompt the user for words and store the words in a linked list. Do not use an array or in any way pre-allocate any … | |
Hi, This is the code fragment: [CODE] #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> int main() { int* bugs_bunny; bugs_bunny = (int*)malloc(3*sizeof(int)); memset(bugs_bunny, 5, 3*sizeof(int)); printf("bugs_bunny[0] %d\n",bugs_bunny[0]); bugs_bunny[0] = 17; printf("bugs_bunny[0] %d\n",bugs_bunny[0]); return (1); }[/CODE] The outcome is: [CODE]bugs_bunny[0] 84215045 bugs_bunny[0] 17 [/CODE] Why is the value printed for … | |
Hello, I am having a problem. The task I have been given is to implement a queue using a linked list. One of the functions of the program is it accept input from the user and write this to a file. The program, thus far, accepts the information, but prints … | |
This program was written and tested in unix/linux environment (in EMacs editor )with a GCC compiler. |
The End.