15,551 Topics
| |
I have this program to write thats a guessing game. the user specifies the amount of rounds and only 5 attempts per round is allowed a round is over when the user guesses correctly or the number of attempts are up. A Message is displayed to inform the user whether … | |
I have a complicated problem at hand, and im open to any suggestions for solving it. Im working with a program called Psi which is written in C and has the GUI in Tcl/tk. A guy working on this earlier added 2 functions to get and set some properties of … | |
| I just wanted to ask what is [INLINECODE]bioskey()[/INLINECODE], what does it do, and how to use it? |
Hi! can somebody please tell me how to avoid floating point overflow error? Mine is a very big program that uses double data type. Is there any way in which I can roundoff double numbers to upto certain digit? | |
Hello friends, I'm trying to write a program to check the status of a process (specified by its process-id), ie, the process is presently running or not. Can you pls give me some idea to solve it? Thanks in advance. Amit | |
hello, we use an async. socket for message handling: [code] WSAAsyncSelect(s, g_iohwnd, SOCKET_IO_MESSAGE, (FD_ACCEPT | FD_CONNECT | FD_READ | FD_CLOSE | FD_WRITE)); [/code] socket messages are directly handled in the g_iohwnd window message loop. Everything works fine beside: [code] status = recv( m_clsocket, ([COLOR=#0000FF][COLOR=#0000FF]char[/COLOR][/COLOR] *)(InputData.m_buffer + InputData.m_buffer_size), RECV_SIZE, [COLOR=#800000]0[/COLOR]); [COLOR=#0000FF][COLOR=#0000FF]if[/COLOR][/COLOR](status … | |
how to turn a user input into a text file for example user inputs 100 and the program creates a text file named 100.txt? I have tried to work it out but it still doesnt work properly. i used [code=c] getc(stdin); char filename[80]; sprintf(filename,"%d.txt", stdin); [/code] and then i also … | |
I'm at the point of learning how to write to a file. I created these lines as a test. My concern is that it doesn't look right that I have to write the same sentences for displaying it to screen and to put it in file. [code=c] /* * data.c … | |
ok here is the deal, i am making a role playing game that has a step by step battle system. it was working until i decided to make a new function called gameplaychoice. now whenever i call to the battle function the progam just skips that line and goes to … | |
How do I make the console window go full screen? right now when you run the program i made it comes up as a small box, but what code would i use to make it go full screen every time a user runs my program? | |
Hi, just have a question regarding classes/inheritance and a variable. ive been trying to work out the best way to do it, but would like some outside input. ok..here goes: i have a base class Ship. classes will inherit from this class. i also have a class tinyShip (and later … | |
:) can u pls help me in my project....it i about programming of basketball game using array..? | |
Can any one please explain the for statement in this code, I understand the initialization of i=2 and the increment of i=i+1, but I dont understand the conditional test of i<(num/2)+1. The program displays all the factors of a number entered by the user. I don't understand why you need … | |
[COLOR=black]Is there a relationship between the maximum queue length and the flexibility in topological ordering? Explain.[/COLOR] | |
Hey, I am trying to open a file with a relative pathname: e.g. file=fopen("/files/index.html"); where the files directory is in the same location as the executable. For some reason the executable cannot locate the file. Why? Thanks, Elise [Edit] OK it works without the initial slash in the path name … | |
im making a program that: -asks a user for their studentID and stores it as a string. -opens questions.txt for reading -prints to screen the question followed by each answer on a seperate line -accepts an answer from user in letter for i.e. a,b,c,d -writes the answer into a file … | |
i have generated the single sequense 6,4,5 ...Kindly help me further | |
writing part of a program where user inputs an ID and the program generates a .txt file with the ID name(numerical ID). [code=c] #include <stdio.h> #include <string.h> #include <ctype.h> #define INFILE "config.txt" #define OUTFILE "studentans.ans" #define IDFILE "stdin" int main(int argc, char *argv[]) { FILE *fout; fout = fopen(IDFILE, "w"); … | |
Quick Question: Is there a way in c to read an entire file into a string or char buffer? Thanks, Elise | |
I think one of the reasons authors of books about programming in C make heavily use of the function scanf() is that is readily available and easy to use for the new learner. That's all good and dandy, however when writers of this books get to the more advanced topics, … | |
/*how to swap two variables without using third variable in c*/ /*program to plot sign of angles from 0degree to 180 degree with increment of 10 degree*/ | |
hi, I am using the header file cnaiapi.h. The c files which include it do not compile because await_contact_mutex, cname_mutex, and appname_mutex are undefined. These are defined in the header file as extern HANDLEs. Any ideas? Thanks[COLOR=#808080] [/COLOR] | |
Hi how to use the MapPoint Control in Visual C ++ 6.0 please any body reply me soon Hafeez | |
So I'm looking into colleges and I see that ITT Tech has a Software Engineering program, and I'm just curious if you guys think this degree is worth the $70,000 or if it's not even worth the paper it's printed on. I want to program video games, websites or software … | |
May I impose on you guys again? I'm trying to learn how to write to disk into a file. I think I got that down, however I would like to be able to display to screen the same text is being written to file. What's a way of doing that?. … | |
this is a program on pay roll.. [code] #include <stdio.h> #include <stdlib.h> #include <conio.h> #include <ctype.h> #define MAX 5 //#define DATAFILE "c211" typedef struct { char ID[6]; char firstname[10] char civilstatus; int dependents; float netpay; float grosspay; float taxwithheld; float sss; } employee; /*---------------------------------*/ char Menu(char choice){ do{ printf("\n<< CS … | |
Hi Guys, I have written the below code but still need to remove the null terminator at the end of each string but don't know how. I've try strtcpy , srtcncpy but doesn't work. Any ideas would be highly appreaciated. thanks. [code=c] while (!feof(fp)) { fgets(line,LINE_BUF,fp); count++; strcat(string1,line); printf( " … | |
| |
Relevant header definitions are as: [code] class XMLChain { private: Segment root; std::vector<XMLOpen*> chain; Segment * immediate; std::vector<XMLOpen> openers; [/code] The function in question is: [code] void XMLChain::open(std::string tag) { Segment * last_immediate = immediate; openers.push_back( XMLOpen ( tag ) ); XMLOpen * cast_immediate = &(openers.back()); (*last_immediate).setNext( cast_immediate ); immediate … |
The End.