49,761 Topics

Member Avatar for
Member Avatar for kashmir323

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

Member Avatar for WaltP
0
2K
Member Avatar for vyrte

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

Member Avatar for iamthesgt
0
439
Member Avatar for poolet

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 …

Member Avatar for WaltP
0
1K
Member Avatar for nijinjose123

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

Member Avatar for nijinjose123
0
177
Member Avatar for bubblesM

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 …

Member Avatar for bubblesM
0
291
Member Avatar for mahesh113

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.

Member Avatar for L7Sqr
0
246
Member Avatar for zanje

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

Member Avatar for L7Sqr
0
111
Member Avatar for SpeedwayNative

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 …

Member Avatar for jumbowat
0
221
Member Avatar for jaai

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...

0
61
Member Avatar for balldrix

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

Member Avatar for balldrix
0
201
Member Avatar for Brandon.G

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 …

Member Avatar for BobS0327
0
490
Member Avatar for Zvjezdan23

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

Member Avatar for Zvjezdan23
0
544
Member Avatar for LeaguePlayer

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 …

Member Avatar for cangan
0
237
Member Avatar for phorce

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 …

Member Avatar for Narue
0
12K
Member Avatar for prakhar_cool

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

Member Avatar for rubberman
0
268
Member Avatar for pseudorandom21

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 …

Member Avatar for dexblack
0
217
Member Avatar for SaimaAsif

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

Member Avatar for SaimaAsif
0
759
Member Avatar for jaclynkinsey

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 …

Member Avatar for Narue
0
367
Member Avatar for alle

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

0
117
Member Avatar for MrEARTHSHAcKER

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 …

0
70
Member Avatar for lxXTaCoXxl

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

Member Avatar for ravenous
0
160
Member Avatar for Foo_with_a_floo

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

Member Avatar for WaltP
0
411
Member Avatar for kchyn

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]

Member Avatar for mrnutty
0
288
Member Avatar for gdubz

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?

Member Avatar for subith86
0
127
Member Avatar for icebirdy

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 …

Member Avatar for thines01
0
96
Member Avatar for DazedanConfused

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 …

Member Avatar for Zvjezdan23
0
344
Member Avatar for gdubz

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?

Member Avatar for Zvjezdan23
0
224
Member Avatar for cangan

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

Member Avatar for cangan
0
257
Member Avatar for BobFX

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 …

Member Avatar for AmrFouad
0
2K
Member Avatar for VernonDozier

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 …

Member Avatar for VernonDozier
0
117

The End.