19,876 Topics

Member Avatar for
Member Avatar for boujibabe

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 …

Member Avatar for boujibabe
0
279
Member Avatar for abhishekmittal

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 …

Member Avatar for John A
0
126
Member Avatar for Monyet

How do you create static methods using C#? How do you specify each items in the static methods? thanx.. I'm a C# newbie >.<

Member Avatar for Monyet
0
127
Member Avatar for Marks256

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.)

Member Avatar for Marks256
0
413
Member Avatar for saintlysav

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 …

Member Avatar for saintlysav
0
116
Member Avatar for sharpyC

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

0
48
Member Avatar for GreenDay2001

I just wanted to ask what is [INLINECODE]bioskey()[/INLINECODE], what does it do, and how to use it?

Member Avatar for Narue
0
143
Member Avatar for Duki

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 …

Member Avatar for Narue
0
141
Member Avatar for soveijn

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 …

Member Avatar for soveijn
0
78
Member Avatar for Harshita_garg

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?

Member Avatar for Lazaro Claiborn
0
425
Member Avatar for trunks1212

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 …

Member Avatar for John A
0
163
Member Avatar for amt_muk

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

Member Avatar for amt_muk
0
124
Member Avatar for Frohdoh

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 …

0
64
Member Avatar for cusado

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 …

Member Avatar for Lazaro Claiborn
0
244
Member Avatar for Aia

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 …

Member Avatar for John A
0
222
Member Avatar for evilsilver

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 …

Member Avatar for Salem
0
106
Member Avatar for chubbywubba

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?

Member Avatar for ~s.o.s~
0
75
Member Avatar for ghostfacelz

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 …

Member Avatar for ghostfacelz
0
114
Member Avatar for Rickenbacker360

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

Member Avatar for Rickenbacker360
0
120
Member Avatar for blackjack

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 …

Member Avatar for John A
0
115
Member Avatar for Richard Lelle

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 …

Member Avatar for nikkiH
0
266
Member Avatar for lai_flipper

:) can u pls help me in my project....it i about programming of basketball game using array..?

Member Avatar for jwenting
0
46
Member Avatar for WhYuLoOkIn

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 …

Member Avatar for WhYuLoOkIn
0
94
Member Avatar for Dude02

[COLOR=black]Is there a relationship between the maximum queue length and the flexibility in topological ordering? Explain.[/COLOR]

0
37
Member Avatar for rwagnes

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 …

Member Avatar for Ravalon
0
92
Member Avatar for cusado

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 …

Member Avatar for Ancient Dragon
0
133
Member Avatar for monishamahna
Member Avatar for cusado

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

Member Avatar for John A
0
96
Member Avatar for rwagnes

Quick Question: Is there a way in c to read an entire file into a string or char buffer? Thanks, Elise

Member Avatar for rwagnes
0
340
Member Avatar for Aia

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

Member Avatar for Aia
0
276
Member Avatar for Rickenbacker360

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 …

Member Avatar for vegaseat
0
230
Member Avatar for gaurav seth

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

Member Avatar for Ancient Dragon
0
85
Member Avatar for rwagnes

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]

Member Avatar for rwagnes
0
312
Member Avatar for ahmadocx

Hi how to use the MapPoint Control in Visual C ++ 6.0 please any body reply me soon Hafeez

Member Avatar for Salem
0
37
Member Avatar for annstephy

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

Member Avatar for iamthwee
0
41
Member Avatar for Virii

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 …

Member Avatar for Ancient Dragon
0
88
Member Avatar for Aia

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

Member Avatar for Ravalon
0
175
Member Avatar for charmee

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 …

Member Avatar for kenjutsuka
0
106
Member Avatar for hariza

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

Member Avatar for hariza
0
5K
Member Avatar for Laughs Galore
0
51
Member Avatar for MattEvans

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 …

Member Avatar for MattEvans
0
105
Member Avatar for Tauren

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?

Member Avatar for John A
0
107
Member Avatar for MIGSoft

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.

Member Avatar for WolfPack
0
140
Member Avatar for sonu2die4

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 …

Member Avatar for Ancient Dragon
0
145
Member Avatar for rasakse

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 …

Member Avatar for John A
0
131
Member Avatar for ronyd

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.

0
49
Member Avatar for cusado

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

Member Avatar for WaltP
0
141
Member Avatar for charmee

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:

Member Avatar for WaltP
0
76
Member Avatar for MIGSoft

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 …

Member Avatar for ~s.o.s~
0
151
Member Avatar for cusado

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 …

Member Avatar for Ravalon
0
189

The End.