49,761 Topics
| |
Basically If the user does not enter a string or character or press any keys after a certain length of time, program will goto or ask again.. or do whatever.. Problem: Not allowing the user to enter input.. Note accepting user input.. [CODE] #include <windows.h> #include <stdio.h> #include <iostream> using … | |
Hi there, I want to get the process name from the process id (pid) in C/C++ program. Please help me. I am using linux machine. | |
Please help me solve this problem, just started c++ and I am lost, this my 1st computer class, please help Write an interactive program that prompts the user for two integers (X and Y) and a value Option) indicating an option. Depending on the value of the option, the program … | |
Hi everyone, I made a program that will check if a process is running.. it is supposed to detect if a process is running and start a timer. If the process has been ended, the timer is paused.. when the process is restarted, the timer continues from where it last … | |
I need to input 3 full names separated by commas Full Name 1: John, Smith, Flynn Full Name 2: Walter, Kennedy, Roberts Full Name 3: Sam, Bass, Clinton Then output it like this First Name 1: John First Name 2: Walter First Name 3: Sam Middle Name 1: Smith Middle … | |
Trying to get an outcome that looks like this.. # ?# ??# ?# # What I'm getting is this... # ?# ?#?# compiles ok, but as you can see it places the # after each ? rather than grouping them together, and it neglects to count back down. Don't want … | |
Hey all I have a dynamic array of pointers to instances of a class ("Player"). The constructor for the Player class looks like this: Player::Player(void) { this->leftChild = 0; this->rightChild = 0; srand (time(NULL)); this->id = rand() % 1000; } The dynamic array of pointers looks like this: Tree* PlayerTree … | |
Can someone explain how to get this output? How do I trace this? Output: * ** *** **** ***** ****** ******* [CODE]#include <iostream> using namespace std; void Triangle(int x) { if (x <= 0) return; Triangle(x - 1); for (int i = 1; i <= x; i++) cout << "*"; … | |
Hello again! Another noobish question :) Can PHP be ran in MFC? Can i add it right in teh html file or convert it over to php? or do i include it in html? do i create a box in c++ tat connects to the php page? or do i … | |
I need help figuring out how to write a program with recursive functions in order to identify the path to a given maze. The maze is read in from a file and then when the path is found the maze is printed with the path shown. The read in maze … | |
I got my hands on the Accelerated C++ book and I'm trying to work the exercises. I want to see the solutions to see if I'm right and see how they did it and how i did it. | |
/* this program compiles is almost done, but i cannot get the las function to sort numbers from the array. the output should have the even number on the left and odd numbers on the fright.*/ [code=cplusplus] #include <stdio.h> #include <stdlib.h> #define N 9 void revArray(int *a); /* reverse an … | |
Hello! I'm a beginner in the worl of C++. I'm building a program that acts as a launcher for a game. In it I have Start and Exit button. What I want the Start button to do is start an .exe with extra conditions: IP and Port. [CODE] if (nResponse … | |
I'm using the function CInternetSession::OpenURL in a "try" to open a webpage (a servelet which returns XML). The servelet take a little while to respond sometimes (around 13-15 seconds in a web browser). When it's slow like this, the code catches a CInternetException. Is there a way to see what … | |
So I've only been programming for a few weeks, and I thought that I'd learn how to program by converting a rather complicated baseball board game to a program. I'm writing a preliminary program that stores player information from a card into a random access file. My Struct holds the … | |
| Hi, I am writing a program that allows to keep track of some racing records and to do this I need to be able to save objects on a external file and then load them with next startup of the program. As I am just a beginner I need your … |
So, once again, this is a really dumb question. I am outsourcing some C++ Programming work for a game. When I say outsourcing, I mean India, so I will never meet these programmers. I was just wondering how I would get the coding off of them. Can I simply ctrl+c, … | |
hi everyone. i am working on the tower of Hanoi code and got a very interesting question. Here is the code of Tower of Hanoi problem: [code]#include<iostream> using namespace std; void move( int n, char*s, char*i, char*d ) // s stands for source tower // d stands for destination tower … | |
It's my first code. I put alot of effort into it. I just haven't been able to see if it actually works because tomorrow I go the the computer lab to test it. Positive and negative feedback is welcomed. Also, here is a link to the description of what the … | |
| |
Hi guys i am trying to write a program that counts the number of lowercase characters in an input file and display the two most used lowercase letters. My problem is I dont know how to get my program to count each lowercase character and save them into an array … | |
Something very strange is happening. I put a breakpoint in VC++ at the line [icode]char *arg[/icode] and string is what it should be. But as soon as I go to the next line, string changes to this: [icode]0x0012f864 ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌ[/icode] I really have no idea why this is happening and I … | |
How do I create a pointer for a struct. This is an example [CODE]typedef struct worker_t { char name[25]; job_t title; double payrate; double hours; }; int input(worker_t); [/CODE] I tried it here [CODE]worker_t employee[10]; worker_t* ptr_worker; *ptr_worker = &employee; input(worker_t employee[10]); [/CODE] I know how to use pointers on … | |
need help adding feeting and inches together [CODE]#include <iostream> using namespace std; // introduces namespace std int main () { int ft1, in1; int ft2, in2; int ft3, in3; int total; int fft; int iin; cout << "The measurement in feet and inches" << endl; cin >> ft1 >> in1 … | |
I can't figure out why I am getting this error. I have tried #include several things and I have tried changing the location of srand. #include <iostream.h> #include <ctime> class Horse { int position; public: Horse(); //Horse constructor??? Per UML int random; srand( time(0)); void advance(){ random = rand() % … | |
I'm doing command line compiling, and thought there might be some switch that would list starting and finishing time, but couldn't find anything. I'm using Windows, and trying to work with the default gcc/g++ from mingw installed with Code::Blocks. Or is there some way of doing this with some shell … | |
[CODE] // image - input image // result - output image // N - width of the image // M - height of the image void _medianfilter(const element* image, element* result, int N, int M) { // Move window through all elements of the image for (int m = 1; … | |
Can anyone suggest me some nice string tutorials because I found few of them but they seem pretty hard to learn (like one on [URL="http://www.cplusplus.com/reference/string/string/"]http://www.cplusplus.com/reference/string/string/[/URL] ) It should be native C++ string library because that is the one I started learning, So I would appreciate any suggestions... thanks | |
Hey all! So i've been working on a unix chat server and I think I've done a good job having no idea what I'm doing :-p. The only issue I'm running into is that I can't get it to go 1 to multiple. For instance, the idea is that any … | |
I have to create this C++ program for a class could someone please explain this more in detail for me Create a new C++ workspace called incomeTax. Construct a C++ program with a function called incomeTax which computes the tax due using the gross income and itemized deduction. • The … |
The End.