51,593 Topics

Member Avatar for
Member Avatar for bmos31

I was just wondering how to pass two objects s1 and s2, both of which have to arguments, to a function, someFunction(). I actually only want to pass the second argument of each object for s1 and s2 to the same function, compare the two arguments and then display some …

Member Avatar for bmos31
0
167
Member Avatar for CodyOebel

I am programming in windows api, and I am familiar with using the ScreenToClient() function, and passing in a POINT structure variable for LPARAM with the coordinates defined in the point struct to simply send mouse clicks and so forth to the window in which I have the handle to. …

Member Avatar for CodyOebel
0
142
Member Avatar for dkolcun

I'm very new to prgramming (in my first Programming class) and have a question about division. My project is to build a math flashcard program. I've gotten every thing else done but having trouble with the division. Where I'm having a problem is when the user inputs the correct answer …

Member Avatar for dkolcun
0
114
Member Avatar for StacyAnn1296

Daily life magazine wants an analysis of the demographic characteristics its readers. The marketing department has collected reader survey records containing, the age, gender, maritial status, and annual income of the readers. Design an application that allows a user to enter reader data and, when data entry is complete produces …

Member Avatar for kes166
0
322
Member Avatar for iamboredguy

I don't get why C++ pros see red when they see [B]void[/B] main(). Can someone explain why [B]int[/B]main() is good and [B]void[/B] main() bad?

Member Avatar for sujitkumarsingh
1
854
Member Avatar for Shredlegend

My program is supposed to sort a doubly linked link alphabetically, and each node contains a single word string, my program crashes when it gets this far, whats missing?? void List::sortAlpha(){ Node * temp; temp=start; while(temp!=NULL){ string a=temp->word; string b=temp->next->word; string c; if(a[0]<b[0]){ c = a; a = b; b …

Member Avatar for kes166
0
102
Member Avatar for fire_

Hello. I know this is lame questinon but what is multi-if syntax? Like this: [CODE]if (a == 0) doSometihng(); if (a == 1) doSomething(); else doElse();[/CODE] Or like this: [CODE]if (a == 0) doSometihng(); else if (a == 1) doSomething(); else if (a == 2) doSomething(); else doElse();[/CODE] I'm useing …

Member Avatar for Fbody
0
90
Member Avatar for vbx_wx

Can someone help me with a good template tutorial about c++ templates from begining to advanced ?

Member Avatar for Narue
0
27
Member Avatar for jakesee

Hi folks, I have a mathematic Vector3 class that looks like [CODE] class Vector3 { public: union { struct { float x; float y; float z; // btw, if declared like // float x, y, z; // will there be a difference in packing order? }; float v[3]; }; // …

Member Avatar for jakesee
0
161
Member Avatar for praky

i am writing a program on huffman's code in C++. I have wriiten the program till building the huffman tree. now I have to generate the code by traversing the huffman tree. I have no idea how to do that logically. please help with code or algorithm. Here is my …

Member Avatar for praky
0
4K
Member Avatar for fire_

Hello. I need your help. I need to write program wich will take numbers from other program's edit. I'm pretty sure that other program is writen with C++. Can you help me to write reading from edit part?

Member Avatar for fire_
0
166
Member Avatar for W34531

You need to submit printouts for question 4c only. We want to display one of the following blocks on the screen, using the same program: [code] *************************** ************************ * * * * * * * * * * * * * * * *************************** * * * * * * …

Member Avatar for W34531
0
149
Member Avatar for gracy1011

Hi, I am working on a project in VC++, i want to get find all the MS project files(.mpp) opened . I am able to get Windowandle for the active window of MSP but not being able to find Handle for other windows (which are in background). Is there a …

Member Avatar for Ancient Dragon
0
46
Member Avatar for sDanyal

I have installed windows 7 which has a built-in intel graphics media accelerator. But there is no option available to check and change its properties. So the problem is that i am building a 3D game in OpenGL but when i run it a message appears that this program has …

Member Avatar for Valaraukar
0
155
Member Avatar for Rishikeshan

I am a c++ programmer. I am interested in ogre. What are libraries needed to compile first of the beginner's tutorial? I already linked 6 .a files. I could not understand the error. Anyone please help. Thanks in advance. Error: [code=c++] ----- OGRE ( MAIN GCC DEBUG DEBUG_FULL BLITZ WIN32 …

0
75
Member Avatar for emigrant_tech

Hi all, I have develepod a basic serialization program with the instruction of my instructor. basically what the program does is,a c# app and a java app access a same XML file. i.e. if i click the button on the c# app, the button will go false and the button …

0
50
Member Avatar for JDean89

Hi, I'm not sure what this code does. [CODE]int total(int value1, int value2) { int sum; sum = value1 + value2; return sum; }[/CODE] This method should take in 2 values and calculate the sum and return it. But I don't understand where it returns it to? In my main …

Member Avatar for chiwawa10
0
116
Member Avatar for nhidman

someone help! how to split an audio file into chunks using c++? and merging it again...

Member Avatar for chiwawa10
0
181
Member Avatar for aravind rao

Hi I am developing a program that uses Breadth First Search to map a grid(2d array) out. Breadth First Search involves storing nodes in a stack and then exploring these nodes based on Breadth or level. I know how to create a vector array which I shall use as a …

Member Avatar for aravind rao
0
178
Member Avatar for Lerner

Suppose you have a node declared like this:[code] struct node { int data; node * next; };[/code] and a list class declared like this:[code] struct myList { node * head; node * tail; int numNodesInList; //member functions etc, but no other member variables. };[/code] Then what is the size of …

Member Avatar for Lerner
0
158
Member Avatar for aviavyne

Hello It's me again, some might have seen a similar string, and it is probably because it is the same, but with a different problem. The following shows a program which uses a function that converts Fahrenheit into Celsius. The problem is that a person can enter any value they …

Member Avatar for NathanOliver
0
200
Member Avatar for doomfrawen

Hello friends, I am writing a program that behaves like a (Linux)shell (but it's not really a shell because it does not interpret commands itself). It will read some commands like in Linux shell and then run the command in the same window of course. The standard MSDOS shell does …

Member Avatar for doomfrawen
0
678
Member Avatar for Obsidian_496

Hello. I've been trying to understand an online material about Binary search trees posted there [URL="http://www.vias.org/cppcourse/chap21_10.html"]http://www.vias.org/cppcourse/chap21_10.html[/URL] I wonder if the code given for class is wrong, or does it use ideas I'm not familiar with? I'm not able to get it to work in my Borland compiler either. It seems …

Member Avatar for Narue
0
105
Member Avatar for Syrne

So for my first assignment of the semester I need to write a program that: 1.) Asks the user to input a string 2.) Asks them to replace part of the string 3.) Have the program prompt "Yes" or "No" on whether the user wants the program to restart, if …

Member Avatar for Syrne
0
96
Member Avatar for hsquared

when adding data into a binary tree, is it possible to add more than one field of data per node? for example say the first left child will have something like "info", would you be able to add a name and age field, then be able to display it? it …

Member Avatar for mrnutty
0
103
Member Avatar for kuen

hi guys, i have some questions here Q1- i want to write programme to count the even and oss numbers example: the user input is 12345 so: even= 2 , odd = 3 this is my code [CODE]int even[5]={0,2,4,6,8}; int odd[5]={1,3,5,7,9}; int n[10]; int count_even = 0 ,count_odd = 0; …

Member Avatar for kuen
0
117
Member Avatar for hsquared

how would i go on about adding an item into an array. the catch here, is that instead of adding content normally, i want the added content to be added as a linked list. for example, if i add something into the first slot, and want to add another item …

Member Avatar for Fbody
0
141
Member Avatar for haggard433

I'm trying to send a list of songnames to a client i built. Everything compiles fine, it even sends the first filename right. When the server begins to send the second filename it sends every filename as one. E.g: First: Like the way.mp3 Second: Pump it up.mp3Billionaire.mp3...... it just continues …

Member Avatar for haggard433
0
132
Member Avatar for JDean89

Hi, I'm not sure what this code does. [CODE]int total(int value1, int value2) { int sum; sum = value1 + value2; return sum; }[/CODE] This method should take in 2 values and calculate the sum and return it. But I don't understand where it returns it to? In my main …

Member Avatar for JDean89
0
129
Member Avatar for ToRtUgOxX

I m searching for a library for filling forms, and click buttons. in C++ , linux or windows. Thanks.

Member Avatar for gashtio
0
420
Member Avatar for haggard433

Hello, I've just started with C++ and I'm creating a program where I can start and stop music on my PC with my mobile phone. Everything works fine in the program for my phone (client), but it seems that the server (PC) doesn't start to play the music. I'm using …

Member Avatar for haggard433
0
136
Member Avatar for Tusike

Hi! I've been trying to create an amoeba program that is smart enough to beat me. So far I didn't really succeed. Please read how I approached the problem, and if you have other ideas of solving it or suggestions, tell me! OK, so basically in amoeba the program looks …

Member Avatar for Fbody
0
284
Member Avatar for coffeewithcream

How do you perform hexadecimal addition in C++? like ACD2 + 23E1 = D0D3 5A72 + 4573 = 9FE5 ___________________________________________________ the addends will be asked by the program then the program should show the sum ___________________________________________________ the addends required are only 2

Member Avatar for mrnutty
0
3K
Member Avatar for keeda

Hi, I wish to implement a priority queue and I need to create it with structures, as in I will be inserting structures into the queue and I wish to keep it sorted(ascending order) it according to one of the structure elements. How can this be done? Any pointers will …

Member Avatar for vijayan121
0
149
Member Avatar for RFID46616c73

Doing this project 1 step @ a time but the multiple files are starting to get confusing. Lemme start by telling you all what I need to do, then show you what I've done, and then maybe you can tell me if I'm on track with this or if I …

Member Avatar for RFID46616c73
2
1K
Member Avatar for NicAx64

Hi, I came up with a difficulty that adding the libmapi32.a to the codelite IDE linker options. I go menu->settings->build settings->select gnu-g++ in the left tree->switch-> and change the -l to the -lmapi32, but the problem is the IDE still does not invoke the `-lmapi32`. I reboot the PC restart …

Member Avatar for mitrmkar
0
145
Member Avatar for itiwcsingkaww

please help know how to get the GCD of fractions... i'm stuck in program because of this... any suggestions will do. tnx

Member Avatar for NicAx64
0
115
Member Avatar for Doomreaper

Hello I come to you today with a question i have not been able to find answer to this anywhere on the internet. I want to be able to send an Email through a Gmail account Using C++. And i cannot be persuaded to move to a different language to …

Member Avatar for Nick Evan
1
225
Member Avatar for oscarp

Hi all, Im writing a concurrent access queue. MY problem is that my producer is too much faster than the consumer, and the queue is allways filling up. I think that I have to write some congestion control, but sith sleeps? mutex? One curious thing, if i write something like …

Member Avatar for Ancient Dragon
0
86
Member Avatar for malvi

Hello Is there any function in visual c++ MFC like round(). suppose i want to round 1.33 = 1 1.67 = 2

Member Avatar for Ancient Dragon
0
67
Member Avatar for babaidebnath

Presently I working on a firewall project. First thing I have to do if any user want to access illegal site I will not let him do so. So I tracking tpc packets. So far for http request I dont have any problem. But for https I do have some …

0
107
Member Avatar for drspock

Hi, I'm a novice at writing C++ code, most of my experience is in C# and Java. I have tried a bunch of things but I can't seem to figure out the correct way to structure my statements. Rather than try and explain everything I'm doing wrong I will post …

Member Avatar for Fbody
0
2K
Member Avatar for Akilah712

Hi, I am to write a C++ date class. I have set up the class. I am able to add and substract to the number of years. The requirements are that I have to do the same for the number of days and the number of months as well. I …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for majeissh

Hi. Could you please guide me in performing operator overloading of Unary operator? Just explain the method with an example. Please add the explanation.

Member Avatar for Fbody
0
225
Member Avatar for s.naroith

I have a problem with c++. I want to change text colour in C++ without using cprintf in <conio.h>. Can you help me to chang txtcolor by using cout or other c++.

Member Avatar for Nick Evan
0
118
Member Avatar for guerrilla123

Hi, I am writing some code to get some data from google suggest api. I am a noob so have run into a problem as my code is retuning blank data. Here is my code [code=c#] public XmlDocument GetData(string phrase) { XmlDocument theXML = new XmlDocument(); try { HttpWebRequest request …

Member Avatar for nick.crane
0
168
Member Avatar for Nicko_FaTe_

I have written a program designed to show grades in a table form, however my first input isn't working ie, if a enter for the first input 55.5 9, the output does not match this, i really have no idea why, any assistance would be greatly appreciated [CODE]#include <iostream> #include …

Member Avatar for Nicko_FaTe_
0
162
Member Avatar for gudads

I dont know if i have leopard mac os x.. but it shows i have Mac OS X version 10.5.8.. i have a simple issue. i am trying to download Xcode for GCC complier... but it doesn't get downloaded as it requires me to update my software to 10.6.1.. i …

Member Avatar for gudads
0
163
Member Avatar for LevyDee

So what is the deal with int and INT, or float and FLOAT, or unsigned int and UINT. Whats the reason for this, and is there any difference in using one or the other? Thanks

Member Avatar for mrnutty
0
89
Member Avatar for MarounMaroun

Hello folks, I have this header file: [code=c]class Agent { private: struct AgentStruct { std::string agentName; double pID; double mID; AgentStruct *nextAgent; } *AgentP; public: Agent(std::string); void SetNextAgent(AgentStruct*); Agent* GetNextAgent(); void SendMessage(); void ReceiveMessage(); };[/code] and I have the implementation here: [code=c]/* * The constructor we are required to implement. …

Member Avatar for mike_2000_17
0
181

The End.