49,761 Topics
| |
Is there a C++ command that restarts the application. The program I'm making is just a console application that acts like a calculator. But once you enter your number and press enter you have to close the console and re-open it to find another number. [CODE] int yes = ; … | |
hello i'm writing a program in c++ and i'm using linux. i use fork() in order to create a process and then i want to wait for the child process to finish so its something like that: [CODE]pid=fork(); if(pid<0) { cerr << "Failed to fork" << endl; exit(1); } if(pid==0){ … | |
hello, My program works fine but I want every time that the user add a character int the calculation section the program will print an error message and will ask the user again... I have try a lot of different things but nothing helps me... for example static_cast() and other … | |
Hi, I have a very basic knowledge in C/C++, I need help in converting HEX value to readable values. I hope some one would give me a clear answer and make it understandable also so that i could learn from it.. thanks | |
I have the following situation for multithreading in C++: Struct MyData { …. } //Class to create a thread specific data Class MiscData { public: CList<CPtrArray, MyData*> myDataList; HANDLE m_dbHanle; String m_SQLCmd; MiscData () { m_dbHandle = DatabaseConnect(connection parameters); } inline FillMyDataList(MyData* data) { myData* pData = allocate memory; pData … | |
I want to learn multithreading in C++. somewhere on internet I got a piece of code using popen() function of stdio.h. I just wanted to know that if this function helps in creating the new threads or it doesn't come under multithreading. Please guide me in multithreading. | |
Im new in C++ im just wondering how to use two if statement with else in the same source project because when im doing it the part 2 else go together with else1 | |
OK, so I am in my 1st semester of C++. I have already finished my 1st assignment (below), a Windows32 Console Application and it works just fine. However, if I write the program as a Windows Forms Application with a GUI, then I can earn extra credit. My problem is … | |
can anyone help me in dividing the opengl viewport into two equal parts so that i display my primitives in the left and black out the right side part... | |
now i am working on an exercise that asks to write this without recursion.... can anyone guide me to what i can do to make this work? i dont want anyone to do it for me but help would be appreciated. [CODE]/* #include <cmath> using namespace std; void getAllDivisors(int n); … | |
Hi, I am currently trying to create a gui program that when you click one button, it executes Net Pause (service), and then the second button executes Net Continue (service), could anyone tell me what code I need to use in order to do this? If it helps, I am … | |
My teacher assigned the class this: Create a simple Game Loop for the game Mastermind. (Search the Internet to refresh your mind on how Mastermind is set up.) Have your computer generate a random 5 digit number, as a string. Then the user must guess the number. Using the code: … | |
Hi everyone, Im new to the community and was just wondering if I could get some help :) I have an assignment where i have to create a program for a shipping company and I was wondering if someone could help me with the coding to assign the sum of … | |
Hello, I'm working with files in a C++ project AND the text file that I need to open is in the same directory, however when just trying to open it like this: [code] string inputFile = "myText.txt"; [/code] It will not open, even though it's in the same directory, so … | |
[CODE]#include <iostream> using namespace std; class X{ public: int p; }; int main(){ int b; X obj; int X::*ptr = &X::p; obj.p = 100; cout<<obj.p<<endl; cout<<ptr<<endl; cout<<obj.*ptr<<endl; system("pause"); return 0; }[/CODE] When i run this program, i get the output as: 100 1 100. I understand why it shows 100...but … | |
So I can set a global low level keyboard hook from within a DLL pretty easily, but does it actually load that DLL into every process? How is it then, "Global" ? Any useful insight into the way this works? I use the command line program "tasklist" with the /M … | |
// I want to make a program having Queue class where message class instances are being used as messages. Later I want to use another class exchange that takes the messages and distribute to the Queue according to messageID. if message id is "111" the Queue named Q11 should be … | |
I am having trouble writing a binary search code to search through my string array. I have the user enter the name of a search engine (engine) they want to locate and my binary search function searches through my string array. Here is my code... [CODE] //****************************************************************************** //This function uses … | |
I am running a program created using [B][B]Visual C++ 2010 [U][U]Express[/U][/U][/B][/B]. I have several dialog boxes to read input data. One works perfectly, but a second one simply does not read any data at all, and I cannot figure out why. The two dialogs are defined as [CODE] LANGUAGE LANG_NEUTRAL, … | |
Hi, I am creating the game which has a lot of images which present buttons and their different "surfaces" which depend of cursor ( move over it, click, mouse up... ). It's really boring to add so many options, to make the button look like Vista-style, so is there any … | |
I'm trying to convert my C# class library over to C++ and was wondering if this is how scientific notation should look. Any pointers would be nice. [code]// Scientific Notation? private int i = 0; private string Sign = ""; public string Output = ""; public void Sci(double x) { … | |
Hi guys i've been stuck by this program for a while... Although you might find it easy,, but i'm still a beginner on c++ so please please help me on this program.. Write a program that will display a pattern depending on the value of n entered by the user. … | |
is it possible to pass this to a function? it's size is configured at runtime. for example, [CODE] void test(string s[][]) { return; } int main() { int x, y; cin >> x >> y; string s[x][y]; test(s); return 0; } [/CODE] | |
Im trying to cin >> a string consisted of numbers and letters such as 3j4583 and storing each separate char to a separate index of an array can u help provide the proper syntax? | |
If I have a file(.txt) that i read in that contains the following : [ICODE] * [111]IPOD FOR SALE 01 Jan 2012 in [1]Mobile by [325]se Submit | $300.00 [102]iphone 11 Jan 2012 in [1]Mobile by [22]aa Submit | $600.00 * [/ICODE] how do i extract the relevant data using … | |
Hello forum, I need help with my first assignment regarding classes. I have no clue where to start so if possible could you please walk me through the best logical process to solve this assignment. I have no clue where to start so any information will help. Here is what … | |
Im trying to take input data from a user as a string of number or letters and store each char on a different array, whats the proper syntax fro this? | |
Hi people, I need to change return type of a function. So function should return array values.In here, data type of the array values are not int,char or double. The data type of the array values are a kind of custom type. So confused. Please help:scared::idea::( [CODE] [COLOR="Red"]void [/COLOR]DataType_Class::insert_rowData_into_array() { … | |
I need to override the Close button an a C++/CLI Form application, allowing the user to cancel the close. This must have been asked a zillion times, but I can't find an example specific to C++/CLI Form applications. My Form class starts with: [code]namespace TR31Forms { using namespace System; using … | |
I have a base class and a derived class. The base class has an int called a that needs to be initialized. I want to create an instance of the derived class, so I call its constructor and pass it an int. I want that to call the base's constructor … |
The End.