15,550 Topics

Member Avatar for
Member Avatar for gahhon

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

Member Avatar for gahhon
0
94
Member Avatar for network prog

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 …

0
41
Member Avatar for piloudoc

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 …

Member Avatar for Ancient Dragon
0
96
Member Avatar for Defoe

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 …

Member Avatar for Defoe
0
107
Member Avatar for Alerwiali

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 …

Member Avatar for saad749
0
80
Member Avatar for fussballer

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 …

Member Avatar for Adak
0
233
Member Avatar for manga127
Member Avatar for manga127
0
228
Member Avatar for baby_c

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 …

Member Avatar for baby_c
0
146
Member Avatar for aznelite89

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

Member Avatar for darkbreaker
0
137
Member Avatar for Lerilaine

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

Member Avatar for Narue
0
1K
Member Avatar for darkbreaker

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 …

Member Avatar for darkbreaker
0
137
Member Avatar for shinsengumi

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

Member Avatar for Ancient Dragon
0
94
Member Avatar for 05026652

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 …

0
137
Member Avatar for shinsengumi

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 …

Member Avatar for group256
0
173
Member Avatar for sam_uncounted

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 …

0
56
Member Avatar for challarao

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 …

Member Avatar for Adak
0
175
Member Avatar for onus

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

Member Avatar for GuitarComet
0
183
Member Avatar for rohit_static

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

Member Avatar for Adak
0
189
Member Avatar for indrajeet6

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 …

Member Avatar for Perry31
0
224
Member Avatar for pinkannu

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

Member Avatar for pinkannu
0
128
Member Avatar for camder23

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

0
46
Member Avatar for Anil2447

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

0
73
Member Avatar for mashhype

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 …

0
64
Member Avatar for Eevee204

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 …

0
41
Member Avatar for digitaldan

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 …

Member Avatar for digitaldan
0
189
Member Avatar for mpassaglia

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 …

Member Avatar for mpassaglia
0
2K
Member Avatar for Lerilaine

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 …

0
68
Member Avatar for harunosakura

I have a project where I need to add binary numbers using C language. I don't know where to start. Help?

Member Avatar for Lerilaine
0
194
Member Avatar for tomtetlaw

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

Member Avatar for Ancient Dragon
0
93
Member Avatar for gahhon

[CODE]do { ++temp_week; 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 ******** MARKING OF ATTENDANCE ********\n"); printf("\t\t PRESENT = 1 ABSENT = 0\n\n"); for(i=0; fscanf(ReadFile,"%d|", &Student[i].studNo) != EOF; i++) …

Member Avatar for vinitmittal2008
0
141

The End.