49,766 Topics
![]() | |
I am making a little silly game in c++ and I am currently working on a way to generate random monsters for me to fight, however, either my random number generator isn't working or my if else function isn't working and it keeps giving me the same monster(Polythemus) If someone … | |
make and run a program that will display the output below ##### #### ### ## # it should use forloops,, i cant make one, but the code is long. i cant make it work also, you need to use the concept of rows and columns heres mine,, its epic fail … | |
Hey All, I just finished my code and it seams to work fine. I'm looking for advice on improving it or making it easier to understand. Its not Fully complete because I only have to set up to take in a number less than 2147483648 because i am using an … | |
How can I solve this problem. I've tried my very best but I can't #include<iostream.h> #include<iomanip.h> int hours=3, hh, mm; void firstorder(); void firstserve(); int main(){ int time; cout<<"The first customer arrived at "<<firstorder<<endl; cout<<"The first customer was served at "<<firstserve<<endl; return 0; } int firstorder(int){ int mint; hh= mint/ … | |
Okay, I was trying to write a program that will take in command line inputs of character or strings, separated by spaces. Ignore spaces, however i am going to want to be able to separate a and b from each other, or c and d from each other. So when … | |
Hey guys, I am a complete beginner to programming. My only background is basic programming in C. I would like to learn more but I don't know where to start, I thought about learning C++ but then i read somewhere that learning obj-C or Java is a better idea. At … | |
[code]#include <iostream> #include <string> #include <iomanip> using namespace std; //Function prototypes declared before main function void InputData(string playerNameAr[], int scoreAr[], int &numPlayersRef); void DisplayPlayerData(const string playerNameAr[], const int scoreAr[], int numPlayers); double CalculateAverageScore(const int scoreAr[], int numPlayers); void DisplayBelowAverage(const string playerNameAr[], const int scoreAr[], int numPlayers, double averageScore); // declaring … | |
hello evrebody; i need some solution to my problem; i wont to have data - base in my progrem based on C++ the user can add and remove from that but i dont know how to save data to local folder in the computer... i find something like this and … | |
I have a pretty solid background on C++. I am interested in possibly expanding to new languages such as Java. I am not interested in reading another 1000 page book on a language when i read that C++ and Java are somewhat compatible. I also read a lot of the … | |
Good Afternoon, I'm having problems with a program that I have to do for school. It deals with pointType class and the main program section. The details of what the program should do are the following: Define and implement a class poinType that implements a point (x,y). The class pointType … | |
what's the difference in these 2? class list { class node { // blah }; // blah }; ********************************** class node { // blah }; class list { // blah }; | |
Ok. So this patch i made has been in beta testing. For some reason my C++ version does not always write the files. but it shows that it patched sucessfully......lists the correct directory where it should be writing the files. They just dont show up. The c# version works though … | |
Hi, I forgot how to do the decimal precision aka magic formula Like after you run the program it give you 4 decimal places but i only want 2 decimal places Hope someone can help!! Thank You!! [CODE] #include <iostream> #include <fstream> #include <string> #include <cstdlib> using namespace std; void … | |
I made a server and i tryed connecting using a telnet saying "Connection refused" . What am I doing wrong ? Thanks in advanced. [code] /* * server2.cc * * Created on: Jan 29, 2011 * Author: astanciu */ #include <iostream> #include <winsock2.h> using namespace std; class Server { WSAData … | |
i want to make a program in which links to different applications in my pc are given and can be opened... for example a program in which output at screen is "which game you want to play? press 1 for freecell and 2 for hearts" and when the user presses … | |
i am beginner that studying c++ i used to use codeblocks but last months i use netbeans, studio express has bad text editor for beginners:P all this time i am using cygwin(always failed) recently i saw on google that with mingw and msys i can compile release and run my … | |
Does anybody have a tested function in C or C++ that sends text to the printer in a Windows Console Application? I would be very appreciative! It would be nice, if I could specify the font. Yes, I can google! | |
in my module i need to print content of dialog box contains some data iam using fox-toolkit and visual studio. i tried with FXPrintDialog,FXDCPrint using FXPrinter classes but am failed and i got error as FXDCPrint no output device has been conntected please help me thanks in advance | |
I made a c++ program but my teacher rejected it because i had used goto function everywhere. she told me that i can use do while instead. so i started replacing goto with do while. after spending so many hours on my desktop when i tried to run it , … | |
I'm trying to write a fraction class and I want a function to reduce the fraction to lowest terms. The problem I'm having is trying to get the fractions to reduce. I need a way to find a common factor in both numbers. All other functions work the way I … | |
Please tell me ..what do you mean by following line void(*fnctn)(void(*)(int *,void **),int(*)(void**,int*)); | |
I need help with the //Find letterGrade function. The program works perfect with the if/else statements that are commented out, but I want to convert it to a switch statement. I did it, but it keeps saying that the variable 'grade' is being used without being initialized...Please help. [CODE]#include <iostream> … | |
I'm fairly new to programming, I'm currently learning c++. I have a for loop that checks a gets each element of the string and converts it to an ascii value. I use this to check a password...for example it has a upper case,lower,digits,etc. So in my loop i have like … | |
Hi, I observed a strange bug in VC6 and Visual Studio compiler. For one particular program I needed to declare a heap as [B]u = new double[width * height][/B]; where width = 640 and height = 480 and initialize all the values to 0. So I did [B]memset(arru,0,640*480[/B]);. But to … | |
I am having trouble making a menu system for a text based adventure game I am creating. I don't really understand all of the concepts yet but I am trying to go to a new situation by setting a number to be a certain situation and then by picking a … | |
Hello everybody! I'm using Visual C++ 2008 and I've done problem "finding hamilton cycle in an undirected graph" after writing a console application. I want improve the program to a window form application and I have 2 missions to complete: 1. How to read an adjacency matrix from a rich … | |
![]() | I haven't written any code in a while and I'm trying to refamiliarize myself but I am having trouble. Im trying to make it so that all the values in an array move down one. Im trying to do that by adding 1 to the value of the pointer that … |
I am trying to get a element of string and cast it as a integer. What I am ultimately doing is in a for loop taking an element out of the string and convering that element to an int. This is in order to get the characters ascii value. thanks | |
I would like the user to input a sentence that contains quotes around a portion of it and then my program will convert any letters in quotes to upper case. My problem is how do i write the statement to start toupper() one i == " and end the toupper() … |
The End.