49,761 Topics

Member Avatar for
Member Avatar for gisek

Hi, I'm trying to create a multiplayer game and I'm wondering if it will be useful to use threads and also how to use them. There would be the following actions in the game (on linux server): 1) server checking if clients are still connected 2) collision detection 3) processing …

Member Avatar for Ancient Dragon
0
150
Member Avatar for fukki

Hello ! I have array of struct and i want 1] when i run the program to load the data from it. 2] when i make changes to be saved in the text file the same time or when i quit the program I tried to put data in txt …

Member Avatar for Nick Evan
0
2K
Member Avatar for fukki

Hello ! I have array of struct and i want 1] when i run the program to load the data from it. 2] when i make changes to be saved in the text file the same time or when i quit the program I tried to put data in txt …

Member Avatar for Ancient Dragon
0
547
Member Avatar for kuchick32

I have a problem. I got my file to open but I don't know how to modify the file and have the output I need. Here is my code so far [code] #include <fstream> #include <iostream> #include <cstdlib> int main() { using namespace std; ifstream input; ofstream output; input.open("input.txt"); if …

Member Avatar for kuchick32
0
105
Member Avatar for fukki

I have read many topics regarding sort but i wasn`t able to sort them. I am new in C++. What changes i must do to sort the names alphabetically ? [code]#include "stdafx.h" #include <iostream> #include <string> using namespace std; class classroom { public: string studentName; void classroom::createStudent(string); }; void classroom::createStudent(string …

Member Avatar for fukki
0
143
Member Avatar for totalwar235

currently i am writing a text based RPG but, when i call for the fight my rand() either does not seed each time or it glitches to continuously gets the "Boar". if you could please take a look at it and see if the problem is in the coding, i …

Member Avatar for totalwar235
0
143
Member Avatar for usep

INPUT's: 1) Name 2) Current date (month, day, year) 3) Birthday (month, day, year) The output will be the person's age in years, months, and days. See example below: Input name: shane Input current date: Month (1-12): 9 Day (1-31): 25 Year (yyyy): 2010 Input birthday: Month (1-12): 9 Day …

Member Avatar for usep
0
126
Member Avatar for vkcelik

Hi. I am making a program to graph quadratic equations using arrays. I got it working drawing the equation when a=1, b=7 and c=5 and with the limits -8 to 1.. But then I wanted to add a functionality so that the graph was scaled down if couldn't fit in …

0
95
Member Avatar for Ee Juan

Question: Each year the HSE Unit receives accident count reports from a 10 departments across the university. To summarize these reports, the department provides a frequency distribution printout that gives the number of departments reporting accident counts in the following ranges: 0 - 19 20 - 39 40 - 59 …

Member Avatar for Ee Juan
0
163
Member Avatar for bee90

I am practicing the inheritance concept od oop in c++. It seems like a simple program but the linking error my compiler Dev C++ 4.9.9.2 version is giving me, makes it look sooo annoyingly difficult. Error is: [CODE] [Linker error] undefined reference to `vtable for Cd' [Linker error] undefined reference …

Member Avatar for bee90
0
185
Member Avatar for bigwhiteegg

This is the main part of a project I assume all other header and cpp file are correct cuz most of them are copy from books n the professor when I run it, "right after the input" the program sort of stopped, pop out a error message, then keep running …

Member Avatar for bigwhiteegg
0
104
Member Avatar for neoraghav

Hi, Need help to know, how to diaplay a count down timer in the dialog box using MFC. and when the timer ends the dialog should colse........ Please provide suggestion......

Member Avatar for neoraghav
0
270
Member Avatar for sasucker

For my assignment this week, I was supposed to create a program that would read in names from a file, sort them, then output the names sorted. I attempted to do it as a insertion sort, and seemed to have failed miserably... if anybody could point me in the right …

Member Avatar for llk
0
2K
Member Avatar for burcin erek

the program is running well but concept is wrong. you should find number 0-100 until 10 trials. if failed, and want to play again unfortunately program is terminated why ? [CODE]#include <cstdlib> #include <iostream> #include <windows.h> using namespace std; int sayiturev (int aralik) // generating number 1-100 { srand(GetTickCount()); int …

Member Avatar for burcin erek
0
268
Member Avatar for ghingghing

i am new fr this site and i guess i will get some help fr here we have a project on our finals and we need to make a program of payroll using menu with the output of employee name, update employee record. display employee record, delet record and exit …

Member Avatar for ghingghing
0
127
Member Avatar for beatenbob

This is my school's assignments and I'm a beginner in C++.. I'm trying to write a program which prompts strings input from user. Say if user enters "My name is blabla", the program should print the exact same thing without ignoring the characters after the whitespace. I tried using a …

Member Avatar for WaltP
0
158
Member Avatar for aviavyne

I'm a beginner at c++ and i was given a certain assignment. A person enters a digit, and then this digit is multiplied by 4, but if the multiplied number is greater than 9 then we add its digits, and if the addition still give you greater than nine, then …

Member Avatar for WaltP
0
134
Member Avatar for enja
Member Avatar for ixmike88

hello i am still fairly new to network programming and have been reading up on it but can't find any solid examples for what i'm looking for my goal is to make a bot that connects to a server via the battle.net protocol, and part of it involves parsing data …

Member Avatar for ixmike88
0
95
Member Avatar for aviavyne

I need to write a new code which can do the following: Write a function-driven program that gives the new ID for a 4-digit integer entered from the keyboard. The new ID is formed in the following procedure: The last four digits of a social security number (SSN) will have …

Member Avatar for myk45
0
146
Member Avatar for XodoX

I'm trying to do the following using a linked list. [quote] delete("is",2) print 1:This 2:is 3:an 4:an 5:icorrect 6:sntence delete("an",3) print 1:This 2:is 3:an 4:icorrect 5:sntence delete("icorrect",4) print 1:This 2:is 3:an 4:sntence insert("incorrect",4) print 1:This 2:is 3:an 4:incorrect 5:sntence delete("sntence",5) insert("sentence",5) print 1:This 2:is 3:an 4:incorrect 5:sentence neighbors("is") 2:is previous:This …

Member Avatar for myk45
0
93
Member Avatar for kiruba_lks

Hi im new to the forum & c++. I just want to upload a txt file to a FTP server using winsock. Im writing a c++ application. Application makes a socket connection & communicate with FTP server. I can provide FTP commands & server responses well. I want to know …

0
135
Member Avatar for mitrious

I wrote these functions and when I call them they're not working ... and I don't know why. here is the code for the functions [code=c]istream& read_notes(istream& in, vector<double>& nt) { if(in){ nt.clear(); double x; while(in, x){ nt.push_back(x); } in.clear(); } return in; } istream& read_info(istream& is, Info& inf) { …

Member Avatar for mitrious
0
175
Member Avatar for Vv IVIatthew vV

Hello daniweb! i have recently started to learn c++ and have made a few programs, (a hello world and a multiplication program) following some tutorials. So i decided to try and make my own, but it did not go well. After debugging in microsoft visual c++ 2010 i got loads …

Member Avatar for gerard4143
0
265
Member Avatar for ganesh_IT

Hi guys, i want to overload input stream for class Date_Time [CODE] class Date_Time{ //Containment class Date d; Time t; public: Date_Time(); Date_Time(short date, Date::EMonth month, CYear year, short hour, short minutes, short seconds, bool meri); Date_Time(short date, Date::EMonth, CYear year); Date_Time(short hour, short minutes, short seconds, bool meri); Date_Time(Date …

Member Avatar for sowmyadantuluri
0
158
Member Avatar for UberJoker

Hey guys. Last week I programmed a AVL tree. This week i am trying to build a Btree. Can someone explain the differences between a AVL tree and a Btree. They seem kind of similar in the sense that both need balancing, but how different are they when it comes …

Member Avatar for dilkash
-1
1K
Member Avatar for manoj201jain

Hi Everyone, I had written the source code in .C file and compile it without any errors but when i run that program it gives me linker error. i.e. Linker Error : Undefined Symbol _getmaxx in module filename.c I am using TURBO C++ version 3.0. Pls give me the solution …

Member Avatar for Ancient Dragon
1
1K
Member Avatar for neoraghav

Hi, Need help, I'm using vc++ 6. I want to know how to open a dialog box [in MFC ] of other class using an object pointer of that class.......

Member Avatar for Ancient Dragon
0
67
Member Avatar for neoraghav

Hi, I have 2 dialog boxes. In the first dialog i'm getting input from the user to add two numbers and in the other dialog I'm printing the value. i.e., when i click on the add button on the first dialog , the current dialog shoud close and it must …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for harpay

I cant figure out how to write the code where if the user inputs anything else than (a to h), it gives an output of Invalid Selection. Or if the user enters q, the application Quits. Here is my code so far. Please Help #include <iostream> #include <iomanip> #include <cmath> …

Member Avatar for myk45
0
262

The End.