15,540 Topics
| |
Hi all, I am new to C programming and need some of your help. I am trying to convert a string(ex. 25,000) to an integer. I use the atoi function to do the conversion, however, it only reads the initial portion of the string by stopping at the first non-numerical … | |
Hey I have to make the game War (card game: [url]http://en.wikipedia.org/wiki/War_(card_game)[/url] ) in C. Im not sure where (how...) to start. My basic thoughts/ideas/etc: Its a 40 (4 times 10) card version with 2 players. A way to do it would be set up a structure with 4 faces values: … | |
can any one tell me what are compiling errors and what are linking errors | |
I have to design a parser to convert Binary(HEX) File into number. I have to refer a format file for the same which is as follows: (Sr No;field_name;position;length;datatype;flag;) 1;TimeStamp;0;4;HEXA;0; 2;TimeOffset;4;4;HEXA;1; 3;Data_Vol;8;4;HEXA;1; ................so on.........it has 60 fields, which represent 1 record. Binary file: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Can you please help me coding this … | |
Hello guys this is my code. [CODE] #include <stdlib.h> #include <stdio.h> #include <string> using namespace std; void charToBinary( char *value ) { unsigned int i; unsigned int alloc = (strlen(value)+1); int* cVec = (int*)malloc(alloc); for( i = 0; i < strlen(value); i++ ) { //works in windows but not on … | |
i know this sounds a bit n00b but can anyone tell me how to open a web browser in "c" because i am doing this project and i have to make a program that opens a web browser.. i need it to open the default internet explorer web browser and … | |
Hi i am in a trouble please help me. in my program i had an array [CODE] int Maxwordcount[127]; int index=0; char ltr; char *typedword; char word[127][300][30] = { {............................................................}, // index = 0 {........................................................} // index = 1 ............ ................... ............................ {"a", "and", "apple","adobe","anvira","avast"}, // index = 65 {"boat", … | |
In this program, I cannot in put - integer. It outputs wrong result. What should I do to make it possible? Thanks heaps !!! [CODE=c] #include<stdio.h> int main(){ int num; int max=0; printf("Enter +/- integers or enter 0 to Exit \n"); while(1){ scanf("%d",&num); if(num==0) break; if(num>max) max=num; } printf("Max is … | |
i need help with this program im getting this 1>selections.obj : error LNK2019: unresolved external symbol "void __cdecl displayArray(int * const)" (?displayArray@@YAXQAH@Z) referenced in function _main 1>D:\Documents and Settings\ERIC\Desktop\Projects\selections\Debug\selections.exe : fatal error LNK1120: 1 unresolved externals please help [CODE]#include <stdio.h> #include "genlib.h" #include "simpio.h" #define size 4 void sortArray (int … | |
hi, i have some data in variables of different types.(short, int, long, float, char, double). now i have to create one pointer, have to allocate 1mb memory and have to store one by one in that pointer. How to do this.. plz give some clues to start.. which type i … | |
Hello, I need your help in updating the loop in this code. the purpose of this loop is to open and read all data file in the programme area that has a name (passenger xxxx) where x is any number from 0 to 9 . please help me, [code]void Print_allPass() … | |
is there anyway to print out any string on stdout without using semicolon at the end... ?? plzz reply | |
Hello there.. Can anyone give me an idea for a fun project in C? I just need something that will keep me busy and pretty much entertained. It's also for practice. What I mean when I say a fun project is something like the last Machine Problem I made. It … | |
Line by line I need to get the whole content in a line from a file. I have looked at fgetc, fgets. According to fgets, I need to specify max number of characters to read. If I have file content like this: 1235690,9087657788888770000,89977553223456789\n I wouldn't know how max characters in … | |
I am having trouble with the following program. I am trying to create a linked list that behaves like a FIFO queue. I need to be able to add new items to the end of the queue and remove them from the front. My confusion is with trying to use … | |
how many processes will be created when i fork() twice . Is this logic correct ? the 1st fork will spawn child C1 which is a child of the parent process P. the code segment of the parent P is inherited by C1. the 2nd fork is called by both … | |
Hi, I have a problem with strtok(). I have string in this form 2000;ON_0;1000;ON_2; and when I execute this code: [code=c] for ((p=strtok(Seq_String,";"));p;(p= strtok(NULL, ";" ),n++)){ foundThings[n] = p; Send_String_pc("\xd\xa\xd\xa"); Send_String_pc(foundThings[n]); } foundThings[n]='\0'; [/code] I get : 2000 ON_0 10 It is C code for microcontroller and this is not … | |
Suppose i have a random permutation of 0,1,...., N-1. Now if i want to get the identity mapping from this can i do anything better than sorting?? I mean, sorting does not take into fact that all nos from 0 to N-1 are in the array or not. But in … | |
Hi, I have been trying to profile code by putting in timing function at the start and end of the function(a function may call some other function and so on ) just before the return statement if the function returns something. The time is calculated in milliseconds. I wanted to … | |
I need 2 programs in C language 1.Which create a Box and in a square box it takes input from user and print with in the box.I have made a program but when i take input the box corners are breaking from left and right side please help in in … | |
Assume that a language uses /* and */ pair for comments.Write a C program to check for balanced /* and */ pair in a given text file.Use pointer implementation of the data structure. | |
[code] void HandleTCPClient(int clntSocket) { int recvMsgSize; char echoBuffer[32]; char test[32]; char reply[32]; memset(&echoBuffer,0,sizeof(echoBuffer)); memset(&test,0,sizeof(test)); memset(&reply,0,sizeof(reply)); if((recvMsgSize = recv(clntSocket, echoBuffer, 32, 0)) <0) { DieWithError("recv() failed."); } while (recvMsgSize > 0) { if(send(clntSocket, echoBuffer, recvMsgSize, 0) != recvMsgSize) { DieWithError("send() failed."); } if((recvMsgSize = recv(clntSocket, echoBuffer, 32, 0)) <0) { … | |
Hello, I need your help in this programme. The programme is explained in the attachment file. the main problems are: 1) how can I get specific data from a data file. (as required in 3,4,5 and 6) 2) how can I solve the problem of over written the data file … | |
I am learn about using arrays and i need help [CODE]#include <cstdio> #include "simpio.h" #include "strlib.h" #include <iostream> using namespace std; #define Max 6 int main() { int power2[Max], i, n; for (i=1; i<=32; i++) { power2[i] = i; i = i*2; } for(n = 0; n<=Max; n++) { printf("%d … | |
Hii there Can ne tell me how to compile and run a C prog. using microsoft VC++... Till now i have been using Turbo C++ Compiler... | |
Hi!i need your help.please help me solve my assignment in numerical analysis,our teacher asked us to get the derivative of a function using turbo c programming language.I really don't have any idea on how to solve this. The equation would be like this [COLOR="Red"]f(x)=3x^2-5x[/COLOR].In this program, the user is asked … | |
can any one give code for cpu scheduling algoritms (fcfs ,rr srtf,priority) in c | |
This is in c programming. The question is not with me right now but its like this, the program wants me to input 10 numbers and then find the average,total,maximum and minimum, Then print back the numbers according from lowest to highest. I'm having a bit of difficulty doing it … | |
Please let me know if this is possible or even remotely possible! I need to write to a file, but directly to hex. For example, if I write "2D" to the file, i want to be able to open the file in a hex editor and see "2D" in the … | |
please help me with my problem... i have here a running program...but then you have to press the keyboard twice in order to input data.. can you help me to modify my source code???please..my future depends on you...-_- specification: Accepting data in the lists should only terminate only if the … |
The End.