15,552 Topics
| |
It is a grading system, but its not calulating the grades [ICODE]#include<stdio.h> #include<conio.h> #include<string.h> #define max 2 void Cal_semester_Grade(char studname[][25],int gradeavg[][1],int examAvg[][1]); void Class_Grade(char studname[][25],char classname[5], int classgrd[][3],int gradeavg[][1], int Maxtestscr[][3],char subjectname[15],int classprectge[][3],int finalClassgrade[][1]); void Exam_Grade(char studname[][25], int examMarks[][2], int MaxExamTest[][2],int Examperctage[][2],int examAvg[][1],int finalExamgrade[][1],int paperweight[][2]); //void search_name(char); void Menu(); char … | |
hey can someone suggest the best way to get the list of files in a directory. i only need files no need directories. given a folder, i want to write a program that gets all the files in it. its part of a much bigger program. appreciate any help. many … | |
how do i concatenate a an array. This is the code. [code] char data [128]; char c, s, l; char *cmd_array [128]; count = 0; char * pch_W; pch_W = strtok ( inbuf, " " ); while ( pch_W != NULL ) { cmd_array_W [ count ] = pch_W; pch_W … | |
Hi I want to write a program which reads a hexadecimal number and returns an decimal number. I wrote that code(inspired by some code pieces from web): [CODE]#include <stdio.h> int main() { int hexa; scanf("%x", &hexa); printf("%d", hexa); return 0; } [/CODE] but it does't give the answer I want … | |
I am getting the above error when trying to compile.. main.cpp [code=cplusplus] #include <windows.h> #include <string> #include "resource.h" #define GETITEM(item) GetDlgItem(hWndDlg, item) static bool keeprunning = true; static bool keeprunning1 = true; static bool keeprunning2 = true; static void run(); static void breakrun(); static void lunchrun(); static void end(); static … | |
[code=c]printf("reading input image ... \n"); /*unidata.image = (image_ptr*)read_pnm(argv[1], &(unidata.rows), &(unidata.cols), &type); */ printf("hello.jpg"); printf("image read successfully \n"); printf("rows=%d, cols=%d, type=%d \n", unidata.rows, unidata.cols, type); /* error here*/ printf("well"); [/code] the errors are coming between the two final printf statements. when the read_pnm() is left uncommented it is a segmentation fault, … | |
Hi friends Please help me with suitable code snippets to simulate a 2-server queue in C. | |
Hello, I am currently working on a program which will take a set of strings from a data file and store them into an array called word. So far my code has compiled correctly however I just added in malloc and it just doesn't like me. I need to malloc … | |
Hi friends I have an problem in C with simulation of Inventory problem. Help me with suitable code... | |
Hi i have a program that outputs a bunch of hexadecimal numbers. Here is a example: 18 3048 ffff8007 The thing is i want all the outputs to be 8 digits long, so i want the out put to be something like: 00000018 00003048 ffff8007 so yea basically i just … | |
hi guys im working on making a program where u get given a machine code. The first 6 bits are the opcode, the next 5 bits is the source register, the next 5 bits is destination register and the last 16bits is the immediate. What we have to do is … | |
how do I get the maximum, minimum and the average of an array? this may be different but how do I get to stop inputting number in an array. for example if the array is 20 and i only need 10 of them. i think its something about EOF but … | |
hey, im having a problem getting file stored into linkedlists. the program crushes when start reading. [B]these are the structs:[/B] [code=c]typedef struct category { char categoryID[5]; char categoryName[25]; char fareType; char categoryDescription[250]; unsigned numItems; ItemTypePtr headItem; //ptr to item struct CategoryTypePtr nextCategory; } CategoryType; typedef struct item { char itemID[5]; … | |
I have been working on my final project that i am going to do a simple soccer game. Not graphical. I will ask the user to choose or create a team. Teams are saved in the same file as the code as text files. where i am stuck is, i … | |
Following is my client code....I am receiving data of equal size of JPG file... so if anyone can help me out with reading buffer properly and writing it in to jpg file at client side ================================================ do { memset(buffer,0x0,BUFFER_SIZE); // init line rc = read(sd, buffer, BUFFER_SIZE); if( rc > … | |
I am trying to write a program for my school assignment, but this programming thing is extremely hard, so I am looking some help in getting it done. The program i am writing is a basic grading system, where it should show the students class, and grade, and also calculate … | |
Hi, I am expected to use sscanf function in a program, but I couldn't understand how it works. Can you explain it with an easy example? Thanks -- newbiecoder | |
Hi, I've written a program that reads object information from an ASCII file (exported from 3dsmax) so that an object/objects can be reproduced in OpenGL. It works fine at the minute and can read multiple objects from a single file but what I want to be able to do is … | |
I am new to Win32 API and am having trouble setting up the menu. Here is what I have at the moment (my new way of doing the main.cpp code is from another member) but I cannot understand where to put in the function call for the menu.. main.cpp [code] … | |
Dear all, I have read a lot topics about reading binary files but I didn't find something about my problem. How possible is it to read a binary file that you don't know the file format? I am sure that there are at least chars and float numbers. Thanks a … | |
Hello again, got myself stuck again with my lack of time between coding c. Gotten myself lost with pointers this time i'm pretty sure. Declaration in header file [code=c] extern DiskRequest proc_new_disk_request(int procnum, int sectornum, ReadOrWrite rw); [/code] Where i'm calling it from and some code around it to make … | |
If you look at the end, i try to store some values in a few arrays. When i try to print these out, I receive complete junk. any thoughts? [CODE=C++] #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #define MAX 122 #define MIN 48 char GetRand(); void RC4(char *realpw, char … | |
I'm trying to create a cipher that eventually will read an entire .dat file then re-write it encrypted and as of now I am using code blocks. Right now I’m just working on being able to do it one word at a time, but I get a really big error … | |
Hello! So, I have a problem with the following code... I'd like to know, why the variables pid and ppid are not initialized? Inside the if scope, if I print them out, they are initialized to getpid() and getppid() value, but when I want to print them out in else … | |
I am using GetWindowText to take user entered data, then seperate it out into variables, then finally use the one variable I need. .The only problem is that when debugging, I am seeing 2:00 pm listed as "2:00 pm", '\0' <repeats 17 times> it should just be 2:00 pm or … | |
Hello, It's been ages since i've coded in c and i'm assuming im having a problem with the syntax. I am sure this is stupid and very in my face but i cant seem to work out my errors at compile time. disk.c: In function `update_rw_requests': disk.c:531: error: `rw' undeclared … | |
I've got some of my project finished. This is supposed to 1) check to see if each word in the input file is a palindrome using stacks 2) If the word is a palindrome, write the word to a separate output filr. 3) Count the number of words read and … | |
Hi all, i have a problem which is i want to call function in different .cpp file.i create .h file. in main function, i include xxx.h as header file.in xxx.h i list down all the functios inside the file with extern.than in xxx.cpp i declare variable like dis e.g extern … | |
If you run this code, you will see that the first two lists values do not show up. I'm pretty sure this is because I am trying to print chars as numbers. I'm just wondering how to do this. Thank you. [CODE=C++] #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> … | |
So I've got a program that takes an encrypted file and essentially decrypts it. I am now trying to modify this file. During the encrypting process, the words were scrambled by position. The location of each word is marked with a position value. I decrypted the original text, so now … |
The End.