49,761 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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...... | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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) { … | |
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 … | |
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 … | |
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 … | |
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 … | |
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....... | |
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 … | |
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> … |
The End.