19,876 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 … | |
Hello friends, Can anyone plz tell me the difference between a using declaration and using directive ? I know this: A using declaration adds a particular name to the declarative region in which it occurs. whereas, A using directive makes all the names in the namespace available without using the … | |
How do you create static methods using C#? How do you specify each items in the static methods? thanx.. I'm a C# newbie >.< | |
I am just curious about the pros and cons of each. Please leave your opinion(s). Thanks! (sorry the question is so broad, but i just wan the pros and cons of each.) | |
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 … | |
[COLOR=#0000ff][COLOR=#000000]I am new to these forums and message boards, but I am trying to do a C# windows application Lab and cannot get the code correct for the button's click event which will Cube a "double" number entered into an adjacent textbox. Also, another textbox is supposed to return the … | |
![]() | I just wanted to ask what is [INLINECODE]bioskey()[/INLINECODE], what does it do, and how to use it? |
Hi all I am new to C++ and have a few questions if that is ok. I would like to get into good habbits early (i.e., using switch instead of 12 if else statments) and was wondering if anyone knew right off how to get a timer to time the … | |
i dont have any code yet because im not sure of the best way to go about doing this. 1. i have multiple dlls that i want to statically link to my program 2. when my program starts i want all the dlls to do their own intialization 3. i … | |
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? | |
Ok, I'm writing code for Tic-tac-toe game and I'm almost done I just can't get it to stop when Player 2 wins. It works fine when Player 1 wins or if there is a tie. I know it's short notice, but can anyone help me before tomorrow morning. I would … | |
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 … | |
Hello, I have an exam on wednesday and was given a practice exam but I'm having a little a bit of trouble. 8.What will be displayed on the screen after the following statements are executed in a C++ program? [code] [COLOR=#000000] int a=5, b=2, c=1, d=3;[/COLOR] [COLOR=#000000] int t;[/COLOR] [COLOR=#000000] … | |
I'm not that used to C++ and hoping that someone can help me out with the [b]const[/b] keyword. If I make a parameter to a function 'const' ,and then try to reference it, like: [code=c++] int some_func(const char* param){ char* ptr = param; ... } [/code] to do something with … | |
I am still pretty new to C# and .NET. I am using .NET 2005, and am attempting to use a Gridview. This GV displays data from two tables, one dependant on the other. I cannot, however, get the GV to Edit/Delete a specific column in any row. I was able … | |
:) 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, … | |
Hey again I need a little help with this assignment. What I'm supposed to do is have a user enter a positive integer and then the program should tell the user all the prime numbers before the number the user entered. However, with my program when I enter 22 for … | |
/*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 | |
Hi,I have to read an xml file into a check list in C#.net..pls explain me how to proceed with it..Im a beginner in .NET.. ![]() | |
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 … | |
Hi! The gems programming Series Can I just start off with Gems programming 9 or do I have to start off with 1 and work my way up? | |
Hi, does anybody know how check whether the socket (ie file descriptor) is valid in C? I know it is probably possible to do it using either a read or a write command, however, what other ways are there? Thanks. | |
Hello, I want to know how to implement semaphore without the use of while or any if statement The Problem is Thread A , B , C they all want to output the result at the same time A wants ot print 'A' B wants to print 'B' C wants … | |
someone please help me on how to run this coding using knoppix linux.. using c language.. i really need help.. i want to know.. what is the output.. this is the coding :- [code] int main() { Pid_t pid; /* fork another process */ pid=fork(); if (pid<0) { /* error … | |
Is there an api that converts a texual varaible to an OID (which is respresented in dot notation? In net-snmp, there is an api "getnode" which does this conversion. For example, give the api mymib::ronyd.0. and converts this name to .1.0.1.1.5. | |
hi im still finishing a calculator program. the problem is i am wondering what command to use to break out of multiple loops. my code is [code=c] [COLOR=Gray]#include <stdio.h> #include <ctype.h> #include <math.h> double do0p(char op, float acc, float num) { switch (op) { case '+' : return acc+num; break; … | |
I have to pass this assignment which calculates the income of workers using pointers and structures.. I'd be very glad if you could help me with this.. uhmm.. could you also please tutor me about this program if you got any answer..?? thanks!!:cheesy: | |
Hi everybody. In C running in the Unix environment, there are many ways of getting the directory listing. One I know is to use the ftw library (the way I currently implement it), the other is to pipe from the ls, also sometimes you could use dirent.h. I realize that … | |
im writing a calculator program in c and having some trouble.. basically it needs to have + - / * ^ functions as well as an integer only mode the code so far [code=c] #include <stdio.h> #include <ctype.h> #include <math.h> int main(int argc, char *argv[]) { float acc, num; char … |
The End.