15,552 Topics
| |
Hi , is there a way to download filess from the internet using c ? | |
I have a function that returns an int. How can I call it from the main function. | |
Hi all, please help me. How to create makefile with target? my question is this: I have a file named "server.c" and must create a makefile for compile it in "cygwin" and in "solaris". the tag for the compilation in cygwin are: - Wall - DTRACE - g the tag … | |
um something i have been wondering for a long time is. how do u make it so the user inputs a word and the program identifies the word as a number so like if someone typed the word frog and it reconized it as the number 5. | |
um latly i have ben seeing stuff like bla_bla_bla in tutorials and stuff and im just trying to figure out what this "_" character is supost to mean could any one help me? | |
i am just start Computer grahics. that is my first program please help me [code=c] #include <GL/glut.h> void DrawPixels(); void OurPixelsDrawingFunction(); void SetView(); void SetView(int w, int h) { glViewport(0,0,w,h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glMatrixMode (GL_MODELVIEW); glLoadIdentity(); } void DrawPixels() { glClearColor(1.0,1.0,1.0,0); glClear(GL_COLOR_BUFFER_BIT); glMatrixMode(GL_PROJECTION); gluOrtho2D (0.0,600.0,0.0,600.0); OurPixelsDrawingFunction(); void OurPixelsDrawingFuntion() { glColor3f(0,1,0); /*Set … | |
Hey everyone! I've been trying for a couple of days now to make a function and it's driving me crazy. I need a function that takes a set of numbers in an array, for example: int array[]={4,3,5,7} and produce another array with all possible combinations of those numbers, or just … | |
[B]Question:[/B]I ran into a point where it would be very helpful to send a function a portion of an array, instead of the entire thing. Now i can think of a couple work arounds like sending the whole array and a begin number, and range number, then computing off of … | |
I am trying to return an array of integers from a method into an array in my main. I know that you cannot pass an array in C, but you can pass a pointer to the array. My problem is though that every time I pass the pointer, I seem … | |
I'm trying to write a recursive merge sort on a linked list. I'm basically stuck on the split portion of it currently. I came up with a solution quite similar to many other solutions I've found on the web. Many people say it works but so far my solution doesn't … | |
[CODE]servaddr.sin_port = htons(ADD_PORT); Bind (listenfd, (SA*) &servaddr, sizeof(servaddr)); Listen (listenfd, LISTENQ); #ifdef TRACE err_msg ("(%s) info - socket created, port number= %ld, child number= %ld, waiting for connections ...\n", prog, ADD_PORT, child_n); #endif /* viene detto a signal come reagire se arriva il segnale SIGCHLD, cioè avvia sigchld_h*/ signal (SIGCHLD, … | |
Q.Write a function to accept a main string, one search string and one replace string. Replace the first occurence of search string in main string by replace string{assume the length of search and replace string is same). Solution I tried [CODE] #include<stdio.h> #include<conio.h> void main() { char mai[80],search[40],replace[40]; int i,j,k,l; … | |
I used what's below to delete a directory. It only deletes the directory if it's empty. How could I delete a directory and it's contents? [code] #include <unistd.h> int main() { rmdir("C:\\haha"); return 0; } [/code] | |
I've been building this program to interface with the Swis ephemeris library. It's working beautifully, except for one thing. OK, I need to be able to specify it to retrieve information about multiple planets, such as longitude, speed, etc. So I have a function that parses the command line parameter … | |
[code=cplusplus] #include<stdio.h> #include<conio.h> #include<fstream.h> void file() { for(int i=0;i<30;i++) { char a[10]="2-2aa.pak"; a[4]=a[4]+i%26; a[3]=a[3]+((i/26)%26); fstream file; file.open(a,ios::in |ios::out); file<<"anshulgarg"; file.close(); } } void main() { file(); } [/code] it creates 30 files with new names in bin but when i give relative path ex "\\p\\2-2aa.pak" and adjust a[8],a[9] appropriately it … | |
Sorry for the nubbish question , but I'm wondering which function will do the trick-read a char from keyboard without need to press "Enter"??? | |
[color=#3333FF]presenting here a program fragement of my project two files mainn.txt mp.txt format i have given at the end of this code the problem is that while printing mp.txt the output is not in format as i expected [/color] [code] [color=#33CC00]DF: 1 SA: 2-2 DA: R1 D: 3 SA: R1 … | |
i have a string array and I need to change it to uppercase. what function can I use?? | |
for example.. number.txt: (has these contents) 1.75:2.00:3.00 2.00:5.00:7.24 3.00:6.35:1.00 -- my source code is.. [code=c] #include <stdio.h> int main() { FILE *infile; double a, b, c; char d; double sum; infile = fopen("number.txt", "r"); if(infile == NULL) { printf("number DOES NOT EXISTS!"); } else { while(!foef(infile)) /*here's my problem*/ { … | |
for example.. number.txt: (has these contents) 1.75:2.00:3.00 2.00:5.00:7.24 3.00:6.35:1.00 -- my source code is.. #include <stdio.h> int main() { FILE *infile; double a, b, c; char d; double sum; infile = fopen("number.txt", "r"); if(infile == NULL) { printf("number DOES NOT EXISTS!"); } else { while(!foef(infile)) /*here's my problem*/ { fscanf(infile, … | |
Hi all, someone can tell me where i can find an example of this kind of signal handler? i try to use fenv.h but on cygwin doesn't work (cygwin don't have it) and this program must run on cygwin and on solaris. i try also with SIGFPE, but when i … | |
What does the identifier [COLOR=navy]"[B]break[/B]"[/COLOR] mean and how would it be used? Thanks. | |
Hi, I'd like to know how the following program work. [CODE] #include "stdio.h" #include "stdlib.h" #include "conio.h" #include "graphics.h" #include "dos.h" void iniciar_grafica(); void graficar_datos(); void graficar_vectores(); int procesos[4][5]={1,8,2,4,6, 2,3,8,9,6, 0,1,2,3,4, 0,0,0,0,0},procesos_ejecutados[5]; int cpu=5,uso_cpu,mayor,prioridad,i,midx,midy,pid=4,j; char num[10],c; int main(void) { clrscr(); iniciar_grafica(); midx=getmaxx()/2; midy=getmaxy()/2; while(1){ for(j=0;j<5;j++){ graficar_vectores(); graficar_datos(); cleardevice(); } printf("Si … | |
Develop a[COLOR=red] C program[/COLOR] that has a structure for a list of students that has the array of students and the number of students. The structure for each[COLOR=red] student[/COLOR] consists of [COLOR=blue]ID number, name, GPA, number of courses, and a list of courses[/COLOR]. The structure for each [COLOR=red]course[/COLOR] consists of … | |
Q.Write a function to accept 20 characters and display whether each character input is a digit, lower case letter or upper case letter. Solution I tried [code=c] #include<stdio.h> #include<conio.h> int main() { char inp; int i; clrscr(); for(i=0;i<20;i++) { printf("Enter a character\n"); scanf("%c",&inp); if(inp>='0'&& inp<='9') { printf("It is a digit\n"); … | |
is there a way to convert everything i input to my program into its ascii binary equivalent? if so please show me; thanks. | |
I'm trying to retrieve the name of the computer that my programm is running on. This is the code: [code] TCHAR compName[MAX_COMPUTERNAME_LENGTH + 1]; DWORD cnt = MAX_COMPUTERNAME_LENGTH + 1; std::string name = [COLOR=#800000]""[/COLOR]; [COLOR=#0000ff] if[/COLOR]( GetComputerName( compName, &cnt) ) { name = compName; } [COLOR=#0000ff] return[/COLOR] name; [/code] The … | |
I'm having a problem with my search function for my linked list. It has to do with my foodItem object. I'm not sure what to replace it with since it's part of the function protocol. The previous version of this [URL="http://www.daniweb.com/techtalkforums/thread72745.html#"]code[/URL] used an array and part of my problem is … | |
I'm having some trouble keeping this array in bounds. I have a 10x10 array that I print out on screen. I call a function that changes the center value [5][5] and the values below/to the right/left of this center value. [i][j+1] [i-1][j+1], etc.. So the values constantly change and constantly … |
The End.