49,757 Topics

Member Avatar for
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
488
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
543
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
236
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
266
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
756
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
364
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
115
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
159
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
256
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
Member Avatar for Allander

I'm trying to pass a list from a function to another using templates but get this error message: [QUOTE]/home/mattias/CodeBlocks/SpelBeta/src/player.cpp|64|undefined reference to `void Ground::bulletsCollition<Bullet>(std::list<Bullet, std::allocator<Bullet> >)'|[/QUOTE] Here is the code: [CODE] //In the function calling the template function (*blocks).bulletsCollition(player_bullets.getList()); //In header that the getList is declared #ifndef BULLETLIST_H #define BULLETLIST_H #include …

Member Avatar for mike_2000_17
0
11K
Member Avatar for cangan

Hi all, I just need the array type of Person object. So it will be an array object. Please some help. [CODE] void SomeOtherFunction() { MyDataType ^Person = gcnew MyDataType(); // simple Person object (C++/CLI) } [/CODE]

Member Avatar for cangan
0
266
Member Avatar for lxXTaCoXxl

I recently obtained an HP Touchpad 32 GB, and I'm wanting to develop applications for it. I'm currently downloading the webOS SDK/PDK installer, and have finished downloading Virtual Box. I have the latest version of Java installed as well. What I'm wanting to know, is that I've read that we …

Member Avatar for lxXTaCoXxl
0
110
Member Avatar for Despairy

i tested the following code as my teacher told me but it wont do what i want it to [CODE] vector<GameObjects*> blockers; blockers.push_back(new Wall(pictures,i,j)); vector<GameObjects*>::iterator k = blockers.begin(); for(;k != blockers.end(); k++){ cout << typeid(**k).name() << endl; } [/CODE] what i want to get is "Class Wall" but i only …

Member Avatar for Despairy
0
117
Member Avatar for MrsHeard

[CODE]#include <iostream> #include <cmath> #include <iomanip> using namespace std; int triangleType(double x1, double y1, double x2, double y2, double x3, double y3); double distance(double a1, double b1, double a2, double b2); int main() { double x1, y1, x2, y2, x3, y3; cout << "Enter vertices for the triangle." << endl; …

Member Avatar for MrsHeard
0
387

The End.