49,757 Topics

Member Avatar for
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
148
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
986
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
141
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
113
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
209
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
84
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
66
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
223
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
117
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
159
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
161
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
84
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
141
Member Avatar for eduard77

Hello I passed to functions and I have the next exercise. you are expected to write a program that computes the sum of all the integers in a range specified by the user. In addition to the main function, there should be a function that accepts two parameters that specify …

Member Avatar for eduard77
0
82
Member Avatar for NV43

I'm trying to write a code for class that basically takes a 4 digit input, scrambles the the places of each number so that the first digit is in the third digits place, and add 7 to each number. This is supposed to be simple encryption. I know my functions …

Member Avatar for NV43
0
106
Member Avatar for aviavyne

Hello, I recently started a c++ class, and one of the assignments is that we need to create a c++ program which converts Fahrenheit to Celsius. I have succeeded into doing just that, but I need to validate user input's values, meaning that the program must reject any entries that …

Member Avatar for Akill10
0
148
Member Avatar for kenn1213

#include<windows.h> #include<iostream.h> #include<iomanip.h> int main() { char choice, do{ system('cls'); cout<<”\n\t\tHi!welcome to JKK the best tapsihan!”; cout<<"\nEnter your choice of food."; cout<<"\nWhile eating the program will be on standby if there are any side orders,when done just press 10 to bill out"; cout<<"\n\n\t\tMenu" <<"\n\t[1]Tapsilog . . . . .\tPhp 25.00" …

Member Avatar for Akill10
0
115
Member Avatar for JWebster

Hello everyone, I have an assignment that I am working on for a class at my school. I have to write a program that will open a .txt file and read/copy the code to a string. This is probably really easy, but I guess my knowledge thus far is a …

Member Avatar for Ancient Dragon
0
99
Member Avatar for LevyDee

Is there a way to dynamically add a menu to a window using win32 API rather then using a resource? Ive done some googling, but all i can find is the resource method. Thanks

Member Avatar for LevyDee
0
108
Member Avatar for gerard4143

Could someone please verify. Is it proper to have pointers to containers(vectors in this example) where you allocate memory for them and then free them. I googled and found a posting that stated its considered poor coding style to do this...I doesn't seem like it should be poor programming style …

Member Avatar for gerard4143
0
2K
Member Avatar for alexchen

How can I resize 2d array. I want to create a bool. My new map should measure 10 height and 5 width. [bool msize(int Height,int Width){ return true; }]

Member Avatar for alexchen
0
91
Member Avatar for BEG148

Having problem getting code to even compile. Instructor insists array be in addDays and no adding of extra data members or methods to the class. "Use an array of strings in addDays. It needs to be local to the method since that is the only place that it is needed. …

Member Avatar for BEG148
0
1K
Member Avatar for crodriguez08

Hey, I keep getting this error, but from its description, I can't really tell how to fix it besides from what I've already tried, so any explanation would be great. The error I get is: clientrectlib.cpp(32) : error C2664: 'calcMinMaxValue' :cannot convert parameter 1 from 'overloaded-function' to 'float &'. The …

Member Avatar for StuXYZ
0
190
Member Avatar for Dark Byte

I have viewed some source that contained an identifier with a scope operator preceding it. Ex: [code=c++] ::var[/code] What does that mean/do?

Member Avatar for LordNemrod
0
115
Member Avatar for hurbano

i need help making an add function for an array. i know how to initialize it and have it started. when i add content into the array, i need to add it as a linked list. i have my function for the linked list completed alrady. if anyone can help …

0
73
Member Avatar for Stefano Mtangoo

Seeing we can do it with structs, why do we need classes? See the code and quote from [URL="http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=/com.ibm.xlcpp8a.doc/language/ref/cplr054.htm"]Link[/URL] [QUOTE="IBM Developer"]The C++ class is an extension of the C language structure. Because the only difference between a structure and a class is that structure members have public access by default …

Member Avatar for LordNemrod
0
99
Member Avatar for vbx_wx

[code] #include <iostream> #include <cstring> void rev(const char* str) { char* p = new char[strlen(str) + 1]; for(int i = 0; str[i] != '\0'; i++) { p[i] = str[strlen(str) - i]; } p[strlen(p) + 1] = '\0'; std::cout << p; } int main() { const char* s = "vBx"; rev(s); …

Member Avatar for LordNemrod
0
239
Member Avatar for therstonsplace

does anyone know how the binary information in a video file works... i found the file signature... but i pulled one character off after the file signature and it did not do what i thought it would... my code works fine... i just dont understand whats in the binary of …

Member Avatar for myk45
0
67

The End.