49,761 Topics

Member Avatar for
Member Avatar for eman 22

[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 …

Member Avatar for Tumlee
0
149
Member Avatar for slygoth

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 …

Member Avatar for slygoth
0
2K
Member Avatar for Sunshine2011

[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 …

Member Avatar for Sunshine2011
0
119
Member Avatar for Oscariuz

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 …

Member Avatar for mrnutty
0
208
Member Avatar for master dogs

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 …

Member Avatar for Clinton Portis
0
158
Member Avatar for Ondrej.Behulek

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 …

0
72
Member Avatar for Oscariuz

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 …

Member Avatar for mzimmers
0
177
Member Avatar for Zssffssz

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?

Member Avatar for mzimmers
0
121
Member Avatar for sujan.dasmahapa

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 …

Member Avatar for sujan.dasmahapa
0
345
Member Avatar for Zssffssz

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?

Member Avatar for vijayan121
0
682
Member Avatar for deepak1331

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 …

Member Avatar for Narue
0
10K
Member Avatar for x69chen

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[] …

Member Avatar for stereomatching
0
160
Member Avatar for FangedHavoc

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 …

0
65
Member Avatar for eternalblizzard

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 …

Member Avatar for eternalblizzard
1
166
Member Avatar for random12

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 …

Member Avatar for random12
0
131
Member Avatar for biggnlarge

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 …

0
121
Member Avatar for ShaRp codeR

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 …

Member Avatar for Nathaniel10
0
166
Member Avatar for maybnxtseasn

can anyone explain the purpose of a tracking reference vs native reference in c++/CLI?

0
50
Member Avatar for lbgladson

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 …

Member Avatar for WaltP
0
136
Member Avatar for v_janssens

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 …

Member Avatar for mazzica1
1
1K
Member Avatar for Mona..

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 …

Member Avatar for Mona..
0
357
Member Avatar for Uranium

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 …

Member Avatar for Clinton Portis
0
87
Member Avatar for Braindead90

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 …

Member Avatar for jmichae3
0
187
Member Avatar for champu8

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

Member Avatar for WaltP
0
90
Member Avatar for marceta

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; …

Member Avatar for aramil daern
1
926
Member Avatar for badllama

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 …

Member Avatar for jmichae3
0
241
Member Avatar for ayeshashahid

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() …

Member Avatar for Mr. K
0
111
Member Avatar for pendo826

[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 …

Member Avatar for mazzica1
0
252
Member Avatar for nacceng

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 …

Member Avatar for coolbeanbob
0
69
Member Avatar for aboyslim

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 …

Member Avatar for Clinton Portis
0
109

The End.