15,551 Topics
| |
I have a project to have a file read using argc and argv. Then sort it and do some other things. I'm having trouble with the very first step. Loading the file. This is what I have so far. Any help you be great. [CODE] #include <stdio.h> #include <stdbool.h> void … | |
[CODE]do { ReadFile = fopen("StudentDetails.txt", "r"); if(!ReadFile) { system("cls"); printf("\n"); printf("\t\t ***************************************\n"); printf("\t\t ***************************************\n"); printf("\t\t *** ***\n"); printf("\t\t *** WELCOME TO ***\n"); printf("\t\t *** CLASS ATTENDANCE SYSTEM ***\n"); printf("\t\t *** ***\n"); printf("\t\t ***************************************\n"); printf("\t\t ***************************************\n"); printf("\n\n"); printf("\t\t This File Cannot Be Open Successfully!!\n"); printf("\t\t Please Check It!!\n"); exit(-1); } ++temp_week; … | |
i want to create simple chat program.send message from client and the server forward this message to all clients who log entry. this is server: [CODE]#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <sys/wait.h> #include <signal.h> #include <pthread.h> #include … | |
Hello, I am new in your forum, and i Hope you are nice specialists ! I have a new machine, and i begin to work with win 7. Some times ago i was using Code Blocks, and every things were OK . But now, it's impossible to run my programs … | |
Hey guys. I'm learning by myself the C Development... But I've got a serious problem with one my application. The exercice is: Create a board of 10 lines and 3 columns. Scanf this board. Check the 3 highest numbers of each line, add them And just printf the highest sum … | |
I am having a programming exam ,and we have studied arrays ,files ,and linkedlist ,hash tables ::the question is in what cases is the best choice to use one of these !! because most of the mark goes to how & what kind i used in implementing the program that … | |
Hi, I am developing some code to run on hardware and I am using the sin() and cos() functions inside the standard math.h many times, which slows the program down dramatically. I was wondering if there is a way to "approximate" the sine and cosine of a value (angle is … | |
[B]Help me I want to install C language in my computer how can i do it[/B] | |
please anyone help me to catch this.i tried to return an array from function and access it within main function.i just got a warning [CODE]"function returns address of local variable "[/CODE] and when i execute the program it gives garbage values as array elements..cam you help me pls... [CODE]#include<stdio.h> int … | |
i keep tried many time and the program could not be scan and no output displayed and some illegal character.... pls help or give some guide .... thanks you.... here is my code [CODE]#include<stdio.h> #include<stdlib.h> #define NO_OF_WEEKS 14 #define NO_OF_STUDS 5 void looping(); void List_Student_Details(); typedef struct { int year; … | |
I have 2D char array, dynamically allocated (using malloc). I need to add another line to it but I have no idea how to use realloc with 2D arrays. I have this: [CODE]res = (char **) malloc(1 * sizeof (char*)); for (i = 0; i < 1; i++) { res[i] … | |
I wrote a function in C that receives a pointer to a character array as argument and switch all accented letters with their corresponding character, the code is as follows: [CODE]void removeacc(char *texto){ char a[]="\x83\x84\x85\x86\xa0\xc6",A[]="\x8e\x8f\xb5\xb6\xb7\xc7"; char e[]="\x88\x89\x8a\x82",E[]="\x90\xd2\xd3\xd4"; char i[]="\x8b\x8c\x8d\xa1",I[]="\xd6\xd7\xd8\xde"; char o[]="\x93\x94\x95\xa2\xe4",O[]="\x99\xe0\xe2\xe3\xe5"; char u[]="\x81\x96\x97\xa3",U[]="\x9a\xe9\xea\xeb"; char n[]="\xa4",N[]="\xa5"; char c[]="\x87",C[]="\x80"; char y[]="\x98\xec",Y[]="\xed"; int … | |
Hi everyone. Is there a way to use w3m in a C program such that when we run the program it will automatically "run" w3m instead of us typing it in the terminal in linux? Thanks | |
Hi guys, Basically Im working on a project using an ARM STM32 processor on a Keil eval board. Attached to it is a UC1601 GLCD screen. The problem that im having I want to be able to increase the size of the font, but im not sure how im to … | |
I created a C program that will make a connection to a website. I can compile it with no errors at all but when I run it, I still can't create a connection to my specified website. The errors that are shown in the terminal are: client: connect: Connection timed … | |
I am trying to divide a string in 3 parts and assign to each part to one thread. And luckily I am able to do so. The purpose of the program is to match a character and each thread tries to match that charcter and return results.The main problem comes … | |
Hi,please help me! I wanna write a program for gauss jordon elimination ,for that I need to sort/exchange the rows such that the rows are in order of their increasing zero elements before non zero element in each row like below suppose, input 0 0 3 4 5 0 3 … | |
[CODE=c]#include<stdio.h> #include<stdlib.h> #define GREY 1 #define BLACK 0 #define WHITE 2 typedef struct node * graph; typedef struct stack * snode; extern int stack_counter; graph cnode(int data); //cnode is to create a node for graph void cgraph(void); struct node { int data, color; struct node *LEFT, *RIGHT, *TOP, *DOWN; };//this … | |
Hi, I was trying to code the shell sort algorithm ,which compares data over distances of n/2,then n/4,n/8 and so on till the array finally gets sorted .As far I understood I implemented the code as follows but it doesn't seem to work.Can someone help! here is the c code[code=c] … | |
Hi I'm Indrajeet. I was writing a program in VC++ 2010 Express for file manipulation, and after finally getting all the syntax errors out,my code looks lie this: [CODE]/********************************************************************* This is a program for file manipulation in VC++ Created by Indrajeet Roy *********************************************************************/ #include<conio.h> #include<stdio.h> #include<stdlib.h> //Protoype of the functions … | |
Hi, The following part of code is failling at first free call (Line no.26) giving above error.I don't know what to do.Please reply urgently. [code] int main() { val1 Valstruct; int i; Valstruct.ch = (char **)malloc(2 * sizeof(char *)); for(i=0 ; i<2 ; i++) { Valstruct.ch[i] = (char *)malloc(10 * … | |
i am doing a work that use srt(subtitle file) what i support to do is in command promt user can type: video title -u 3000 subtitle name after that the subtitle will appear 3 seconds after the actor speaks this is wat i have so far: [CODE]#include <stdio.h> #include <ctype.h> … | |
Plz send me the Gauss jordon code snippet or Hint that how to write the code for it. i.e i want for nXn order. Waiting for ur post. Bye | |
Hi Everyone, I have been trying for the past few days to come up with a solution for the following: Use a delay adjustment parameter K in the critical section to adjust the speed of the display process to show that without semaphore protection the displayed contents of the buffer … | |
I've started using Dev-C++ and was creating a game with Allegro, I've created a background named 'Script1.c' and I also made a game map called 'Script2.c'. I've done this at the end of 'Script1' while(!key[KEY_ESC]); exit_allegro(); and I put at the top of Script1 #include <Script2.c> But I'm unsure if … | |
Hello All, I wrote the following code to access a file, assign pointers to the contents of the file, display the file as a matrix, read the last line as a separate matrix, then I am supposed to perform matrix multiplication on the two aforementioned matricies. I have the first … | |
Hello all, I keep getting a segmentation fault when I run this compiled program. [CODE] #include <string.h> #include <stdio.h> #include <stdlib.h> #include "person.h" /* write a struct to the file */ void WritePersonFixedLength(struct person * input, FILE * target) { //use fprintf to write input->firstname '%-20s' fprintf(target, "%-20s", input->firstname); //use … | |
I'm supposed to write a program that will search for longest common substrings in two strings of DNA. Our hint was to look on wikipedia ([URL="http://en.wikipedia.org/wiki/Longest_common_substring_problem#Dynamic_programming"]http://en.wikipedia.org/wiki/Longest_common_substring_problem#Dynamic_programming[/URL]). I did that and I understand the principle of comparing two strings. I'm currently facing two problems. First one is array allocation. When I … | |
I have a project where I need to add binary numbers using C language. I don't know where to start. Help? | |
When I run this code: [code=c] window_handle = CreateWindow("OpenGL", title, style, 0, 0, width, height, NULL, NULL, window_instance, NULL); if (!window_handle) { GL_KillWindow (); MessageBox (NULL, "Window creation error", "ERROR", MB_OK | MB_ICONEXCLAMATION); return false; } [/code] CreateWindow returns NULL. What are the reasons that could cause CreateWindow to fail? … |
The End.