49,761 Topics

Member Avatar for
Member Avatar for Raghusys

I have been told to write a c or c++ program for TCP server client program with some conditions that is listed below: You are to implement a synchronization server managing barriers. Your synchronization server should be a stand-alone single threaded process that continuously awaits requests from other processes (the …

0
73
Member Avatar for sibobo

im newbies in c++... my task is to translate code Morse into alphabet an count the word i use... the problem is i dont know how to use the ifstream to read and use the code Morse that must be kept in .text file i only manage to write the …

Member Avatar for sibobo
0
160
Member Avatar for mevkurray

Hi all. Before you all scream "search the forum", i already have, this and many others. cant seem to find the problem with my code. Basically, i have a fairly large text file, each line consisting of 20 fields seperated by a `. i have got my program to split …

Member Avatar for mevkurray
1
1K
Member Avatar for just4why

I would like to automatically generated staff number before generated the staff number i would like to check the staff.txt is the staff number exist. If exist then it will get the last's staff number and continue to adding. But the code that i creating it wont work. Please help …

Member Avatar for just4why
0
108
Member Avatar for amar singh

[code]#include<stdio.h> #include<conio.h> main() { int a,i,fact=1; clrscr(); printf("Enter a number "); scanf("%d",&a); for(i=1;i<=a;i++) { fact=fact*i; } printf("Fact of %d is %d",fact,a); getch(); }[/code]

-1
67
Member Avatar for arpit.mishra

Hi, I tried to direct the output from a thread into a log file using fstream, but it dosent seem to work. If I use ostream then it works fine. Can you please let me know why fstream is not working. Thanks in advance

1
243
Member Avatar for punchinello

Here's the code: [CODE]#include<iostream.h> int test(); int main() { cout<<test(); return 0; } int test() { int a=1; a==1? return 1: return 0; }[/CODE] Could anyone please help me by telling me why VC++ 6.0 rejects this piece of programming code? Is the line" a==1? return 1: return 0;" grammatically …

Member Avatar for mrnutty
0
129
Member Avatar for freddyvf
Member Avatar for mrnutty
0
71
Member Avatar for punchinello

As I was told, recursion is a good way to make things simple in terms of writing programming code, but the outcome usually involves extra overheads. I was also told that for some recursion algorithms it is possible to adapt them to make corresponding nonrecursion ones. I wonder if there's …

Member Avatar for punchinello
0
82
Member Avatar for restrictment
Member Avatar for Se7Olutionyg

[CODE]#include <iostream> using namespace std; int main() { //delcare varialbe char selection; //declare function void counting_loop(); void impossible(); void missing_item(); void odd_even(); void poem(); void pause_m(void); do { cout << " Welcome to the Fun Program" << endl; cout << " Select from the menu " << endl ; cout …

Member Avatar for VernonDozier
0
110
Member Avatar for samsons17

i'm trying to determine the age of the people by entering their id card number..i'm trying to do this without having the database.. is this code possible??because i got error when try to run it.. if this possible,could you tell me the correct way to do this? Thanks... [CODE] #include …

Member Avatar for jonsca
0
106
Member Avatar for fadia

Hello guys.. I have this tutorial that i keep getting errors on no matter what i've tried.. Would someone kindly check it out for me?! Here is the question: [B]Q1:- Write a program that reads students’ names followed by their test score. The program should output each student’s name followed …

Member Avatar for jonsca
0
105
Member Avatar for rookanga

I am amost done with the code but I need a little bit more help I need to add the bubble sort code & write exchange increment line and add the selection sort code & write exchange increment line, but I don't know how to do it can anyone help …

Member Avatar for Fbody
0
247
Member Avatar for A Tripolation

Hey all. I'm really new to programming and would like some help, if you all don't mind ;) I'm not actually having trouble with the programming, but rather, what I'm being asked to do. Here is what I'm supposed to do (and yes, it is an assignment, but I'm only …

Member Avatar for A Tripolation
0
165
Member Avatar for freddyvf

i am using turbo c++. can you please tell me how to make two or more cpp or exe file together one.

0
87
Member Avatar for ITfav

Hey guys, i'm confused... wat's e diff btn [B][COLOR="Green"]LPD3DXMESH [/COLOR][/B]and [B][COLOR="green"]ID3DXMesh[/COLOR][/B]? Including their uses and so forth... help me understand e diff. Ok, i'm learning Direct X 9. Thx in advance! :icon_smile:

Member Avatar for ITfav
0
141
Member Avatar for tomtetlaw

When I try to compile this: [code=c++] void *BaseEnt::GetVar(char const *varname) { char name = *varname; switch(name) { case "id": return (void*)id; case "name": return (void*)name; case "count": return (void*)count; default: return (void*)NULL; } } [/code] I get these errors: [code] ------ Build started: Project: Test Classes, Configuration: Debug Win32 …

Member Avatar for slackingjuggalo
0
710
Member Avatar for nevets04

Why are there so many people doing c++. I've heard even from c++ coders, that python is better. Is this maybe because c++ has been around longer? What do you think the future of python is? Do you think It will eventually beat out c++?

Member Avatar for jbennet
0
225
Member Avatar for JaBa

Hi! I make c++ programm for school and I have problem with array rotation for 90 degree. I make array rotation from one example, but there is an array rotation on wrong way, I need to make it to rotate to other way. So please help me. Here is code: …

Member Avatar for Clinton Portis
0
107
Member Avatar for nateysmith

[CODE]#include <iostream> using namespace std; int main() { int TESTS = 0; int testScore[TESTS]; int testNum = 0; int a; double total = 0; double average; testNum = 0; cout<<"How many scores are there? "; cin >> TESTS; cout<<"Enter a score: "; cin >> testScore[testNum]; while(testNum < TESTS && testScore[testNum]) …

Member Avatar for nateysmith
0
2K
Member Avatar for xxunknown321

Write a C++ program that ask the user for the name of a file. The program must have a function that prompt the user to enter a file name and open the file. The program should display the last ten lines of the file on the screen. Each line of …

Member Avatar for xxunknown321
0
184
Member Avatar for gcardonav

Hi guys: The following code is supposed to the following: 1 - Receive a random number and divide the number by 1000 2 - Then it needs to check if the number is greater than the series number and the cut point and convert the divided random number to either …

Member Avatar for VernonDozier
0
135
Member Avatar for NinjaLink

My question is, how do you calculate the "Completion Time" as I am alittle confused about it. Do I add the service times and the result is the completion times? Thank you to anyone who helps Jobs --- Service Time -- Arrival Time -- Wait Time J1 --- 2 --- …

0
51
Member Avatar for manoj.pg

If I have the class name in a string varibale, how can I instantiate an object of that class? I am just thinking of COM and CORBA implementations where C++ object is instantiated from the data in the stream. How can I implement it?

Member Avatar for mrnutty
0
677
Member Avatar for jessicamelillo

Hi! I'm currently taking a computer programming course at Wagner college and I have a project due this week that I am completely stumped on. these are the guidelines: [I]This will be a something like a “compatibility program”. 1) You will ask the user their name, and store it. 2) …

Member Avatar for jonsca
0
102
Member Avatar for ArvindRaja

Recently, I stumbled across WinBGIm and decided to resurrect a small game I had made in turbo C++ a long time ago. Anyways, I succesfully got WinBGIm, did the necessary steps. After removing all the errors and building the project in Visual Studio 2008 Professional, I get this error (with …

Member Avatar for md37
0
213
Member Avatar for AdRock

I have got an example for cplusplus.com for converting a string into a char array so i can split in into tokens and adds to a vector and it works fine in the main method but if i try and create a separate function and pass a string as a …

Member Avatar for iamthwee
0
744
Member Avatar for sfrider0

I'm drawing a sphere and some ground. I used GL_POLYGON to draw a rectangle and colored it green. When I added a sphere, my ground just turned black. Is this because the sphere is a 3d object and the polygon is 2d or is there something else? Here is the …

Member Avatar for sfrider0
0
159
Member Avatar for mar000m

please if any one can help me ....i need a radix sort code for names..... all the names are data members in (node class) i just cant write the code so if any one can help me .....

Member Avatar for dibilasd
0
96

The End.