49,761 Topics
| |
[CODE]#include <stdio.h> #include <iostream> #include <string.h> using namespace std; int main() { string str1; char* str; cout<<" enter your command "<<endl; cin>>str1; str=(char*)str1.c_str(); char* str2="exit"; int status; while(strcmp(str,str2)!=0){ // createChildProcess(str); cout<<str<<endl; cout<<str1<<endl; cout<<strlen(str)<<endl; cout<<" enter your command "<<endl; cin>>str; } return 0; } [/CODE] try to run this program and … | |
Hey guys i am interested in knowing how to let my C++ open images. Like set the location on the image in C++ and when i click it, it opens image viewer. Also would like to know if i can do the same thing with music. Like put a list … | |
[CODE] #include <iostream> #include <vector> #include <string> using namespace std; class Member { public: string Name,Vorname; //prototypes vector<Member>*generateAVector(); void SaveElementsInTheVector(vector<Member>*pAVec,Member *obj); void DisplayTheVector(vector<Member>*pTheVec); void test(); }; int main() { Member Neu; //new object //creates a vector on the heap, here with no sense,only experimentally vector<Member>*pAVec=Neu.generateAVector(); //puts data in the elements … | |
Hi guys im trying to make a program that will work as " Slot Machine " and im stuck in one part that i can not resolve. Im trying to verify predetermined char in random array so i can know if some of the three char appear three times or … | |
The following code is for a programming class I'm taking. The program is supposed to prompt for a number, then prompt for a second number. Then it should use a while loop to multiply the first number by the second number. The second number does not change - the first … | |
Hi, I have problem with this code: [CODE]#include <iostream> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <windows.h> using namespace std; void generateList(int * list, int size,int random); void printList(int * list, int size); void bubbleSort(int * list, int size); void insertionSort(int * list, int size); void selectionSort(int * list, int … | |
Hi guys im trying to make a program that will work as " Slot Machine " and im stuck in one part that i can not resolve. Im trying to verify predetermined char in random array so i can know if some of char appear three times or more. I … | |
I was going through all of the tags gettn' used to my fresh DM compiler (love it) and in optimization there was a rather long tag called 'expensive optimization' Th DM website didn't have anything and google just brought up car engines. What does it do? | |
Dear Friends I have a mfc application which I already converted to a dll. now I want to launch that application from another win32 client application. So how I can achieve this. Any h elp would be highly appreciated. check my code snippet. [CODE]//in App.h header extern "C" __declspec(dllexport) void … | |
Ok here it is: I want to read a file backwards, the catch is that I want to do this in binary mode to make a, really lame, data encryption program. Is there any easy way (<10 lines) To do this? | |
Help Me i have created a program to take password from user while accessing a small project, but while user is inputting password it is displayed, i don't want it, i have created all other functions for deleting, editing password. e.g enter password : india001 //i am getting that enter … | |
MY bad this should below to C#... ignore this one please, sorry about that... --------------------------------------------------------------------------------------------- Hi people I found I can only reset the values in the array but I can resize it in a new method and return it back to main method, [CODE] static void Main() { int[] … | |
I am trying to get the text to move on screen by repositioning the x value of the rendered text, but unfortunately I keep loading the program to find the text remains in the same position that it was originally rendered in. I was hoping someone my see something that … | |
Hi, I'm currently working on an Eight Queens problem solving with recursion and backtracking. I have an output for my code, but it is not the desired output and I am having trouble figuring out what part of the code is wrong. Any advice would be appreciated. My header file … | |
Hi, im new here and also new to C++ (pretty much new to programming anyways) I have been working in an assignment and got stuck trying to store information into a 3x3 array, and then retrieving the data. [CODE] #include <iostream> #include <iomanip> using namespace std; int main() { float … | |
I am currently creating a queue ADT for one of my classes in college. We are using a linux ssh server for compiling our programs, but i am writing the code in windows. When i compile i get no errors, but when i run it goes fine until it hits … | |
Hello, I am a first year Comp Sci student and i am trying to finish this program. I am almost done with it but i just can't figure out one thing which is that, how do i show the initial principal amount under Principal heading in loop? the initial amount … | |
can anyone explain the purpose of a tracking reference vs native reference in c++/CLI? | |
I have an assignment to take the functions and use array subscripting and pointer arithmetic to write the functions. int stringLength(const char* s); char* stringCopy(char* s1, const char* s2); char* stringConcatenate(char* s1, const char* s2); and use the following tester driver: but I have no idea where to start when … | |
Hi, In brief, I have written a program in C++ that reads data from a text file, does 'stuff' with that data and then writes the results to a number of separate file. Separately I've written a simple GUI for this program using Visual Basic (allows the user to select … | |
Hi .. I have this program, its reding correctly but its not doing what i want i.e. it suppose to read the input file and call the functions according to the action saved in the file this is the problem : [CODE] #include <iostream> #include <Fstream> using namespace std; void … | |
hi all no really sure where to begin, my uncle owns a signage company he has been given a job where he needs to create a large billboard with a screen to look like a slot machine to be in the center of the shopping center, when customers have bought … | |
Hi, I am trying to work on creating a linked list of player in a game, but I have not written code in a while and have no idea what I am doing wrong, can you please help with suggestion of what I did wrong or idea of how can … | |
If i try to store character in an integer variable...the programs shows error...it repeats certain statements indefinitely... i want that if i try to store character in an integer variable...it should prompt the user to enter integer again...lz help | |
Hi guys, im workin on a little text based RPG using c++. It is a win32 comsole application and i am wondering what i could do to improve it! I have added my source code [code] # include <iostream> #include<ctime> #include<cstdlib> #include<cctype> using namespace std; struct monster { int strength; … | |
Last year I built a generic list, everything was good. This year I'm adding classes to the list. These classes have lists. Everything is okay until the program ends, then it crashes. If I comment out my list destructor the crash doesn't happen. So I'm assuming the destructors aren't unraveling … | |
i need help in making the size of the array to n size in queues.i have made a program help me in it. [CODE]////##############///// #include <iostream> using namespace std; #define MAX 5 class queue { private: int t[MAX]; int al; int dl; public: queue() { dl=-1; al=-1; } void remove() … | |
[CODE]#include <iostream> #include <string> using namespace std; //char inventoryRequest = 'i'; //Function Definitions. void displayInventory(); void inventory(); void exitGame(); int playGame(); int main() { //Menu Text. cout<< "\t******Menu******\n\n"; cout<< "Please choose one of the following:\n"; cout<< "1 -Play Game.\n"; cout<< "2 -Exit.\n"; int choice; cout<< "Choice: "; cin>> choice; string … | |
Below is my code. My assignment is to write a code to ask the user to enter the amount of people in the class between 1 and 25. Then enter that many names and it will list the first and last name alphabetically. ex. jon matt kate = jon matt … | |
Greetings, I'm hoping that i can get some help on an exercise I'm doing dealing with multidimensional arrays. I want to move around a board and calculate how many steps I've taken on the board. Input asks for the seed number and how many steps to take. I just don't … |
The End.