49,760 Topics

Member Avatar for
Member Avatar for Labdabeta

Hello, I have a chain of inherited classes like this: class A { protected: int a; public: int getA(){return a;} }; class B:public A { protected: int b; public: int getB(){return b;} }; Based on that you can see that the public can only read the values in those classes, …

Member Avatar for Labdabeta
0
254
Member Avatar for Lp_baez

I was trying to array a string within a string. And I keep on receiving a compiler error. So I’m wondering if is even possible to string a string within a string? Because that’s the error I keep on getting. If not then what is another way to create a …

Member Avatar for Lp_baez
0
471
Member Avatar for pars99

I have always had this question, but I couldn't quite find anything that answered it. I was hoping someone could shed some light on the question... Thank you in advance.

Member Avatar for mike_2000_17
0
2K
Member Avatar for tanatos.daniel

I have an abstract class CArticle and two derived classes CBook and CMagazine. I also have a class CLibrary where i want to add articles. Its members are an int variable to count the articles and a double pointer of CArticle. I have the following main function: int main() { …

Member Avatar for tanatos.daniel
0
447
Member Avatar for Labdabeta

Hello, I was just noticing that the 'const'ness of references often causes me to rewrite a large chunk of my code with pointers. For example if I have a class that needs access to a large amount of data from another class I would love to use a reference. However …

Member Avatar for mike_2000_17
0
406
Member Avatar for ChimpusDupus

Hi, I want to create a music editing program that will allow you to play songs using a MIDI device. I know there are significant differences in the capabilities of VB.NET and C++ but I'm not sure which would be more suited for such a project. Any suggestions? -James

Member Avatar for Ancient Dragon
0
350
Member Avatar for sreevenkatg

in my dev c++ i'm not getting the window at the bottom of the screen which shows our errors after compilation..how do i find it..?

Member Avatar for rubberman
0
76
Member Avatar for MasterHacker110

Well this is not as much as something that I dont know how to implement, but more something that I dont know why I would want to implement it. When I have a simple class, say this one: class Cube { public: Cube(int x, int y, int z); int return_area(); …

Member Avatar for rubberman
0
112
Member Avatar for senergy

I've googled for a while and found few things (I hate using external libs such as cURL) and I don't really have experience with HTTP, so the question is: how can I interact with websites using sockets? so something like this: 1. I connect to the website 2. I store …

Member Avatar for senergy
0
362
Member Avatar for fsusem1nolez

Greetings, this is my first time posting here, I've been a long time lurker. I have a lab assignment which is: > Write an application where you ask the user to input the price per letter (PPL), and then ask the user to input the sentence they want printed. The …

Member Avatar for deceptikon
0
387
Member Avatar for daino
Member Avatar for rubberman
0
307
Member Avatar for Alice_Blue

Hi all! I'm at work - newly hired:) - and I'm given this mpeg2 video codec [URL="http://www.mpeg.org/MPEG/video/mssg-free-mpeg-software.html"]http://www.mpeg.org/MPEG/video/mssg-free-mpeg-software.html[/URL] and in particular the decoder that exists in the folder mpeg2v12.zip. It is code c written for gcc, so I decided to download MinGW and DevC/C++. I add all the files to the …

Member Avatar for Laszlo_1
0
1K
Member Avatar for 2384443

i need help in this program. The program question is: A function power which will calculate a number m to the power n (m^n). You will pass two parameters float & int. If the parameter n is omitted then it should taken as 2. i hope u all got the …

Member Avatar for 2384443
0
130
Member Avatar for nmakes

How to make a pointer to class and how to use it? Like, what would the cout statements show on screen? #include <iostream.h> void main() { class CLASS { public: int INT; char CHAR; }; CLASS OBJECT; OBJECT.INT = 10; OBJECT.CHAR = 'A'; CLASS *POINTER = &OBJECT; cout << POINTER …

Member Avatar for deceptikon
0
150
Member Avatar for MasterHacker110

I am trying to write a simple text file translator, will translate the text into morsecode. I need something like this to be done: for(i = 0; i < list.size(); i++) { if(list[i] == character_from_file) { translatedLine = list[i_the_second]; } } I am wondering if I can use the "list" …

Member Avatar for MasterHacker110
0
147
Member Avatar for wavsyntax
Member Avatar for bigdawg22
Member Avatar for bigdawg22
0
675
Member Avatar for noufza

hey there, i need help solvings my lab assignment in chapter 5: control structure II (repetition) 1. write a program that: a. prompt the user to enter an integer number x greater than 1. b. use a flag-controlled while loop to check whether the entered number x is prime or …

Member Avatar for noufza
-1
220
Member Avatar for new_developer

Hi there, I have a question related to C++ functions. If a boolean return type function contains too many returns in it, does it cause any problem ?? In my program one of the bool function contains too many return statements, in if conditions. And interesting thing is that it …

Member Avatar for Ancient Dragon
0
219
Member Avatar for charles.dupree.37

Hi My name is C.D., I am currently taking C++ 1, I have an assignment that asks me to write a function that displays the prompt string and then reads a floating point number and then returns that number. The book gives an example of the code to use in …

Member Avatar for rubberman
0
849
Member Avatar for Asus93

while (!correct) { cout << "Please enter an angle value => "; cin >> value; //request user to input a value if(cin.fail()) { cin.clear(); while(cin.get() != '\n'); textcolor(WHITE); cout << "Please enter a valid value. "<< endl; correct = false; } else { cin.ignore(); correct =true; } } Hi, this …

Member Avatar for Ancient Dragon
0
246
Member Avatar for vyalineconstantino

Illegal else without matching if, but I have an if after else. :( And how can I round off the results? I mean, if it shows 4.5 it would display 5 and if it's 4.5 it would display 4? Please help me. :(((

Member Avatar for ddanbe
0
304
Member Avatar for Ghufran Ahmad

I want to open any website using me c++ program. But don't know ho it will be done, please help me.

Member Avatar for rubberman
0
96
Member Avatar for Labdabeta

Hello, First of all some background. My friend and I are having a bit of a competition over theoretically infinite number storage. We have agreed that the first person with a working arbitrary precision integer library with the theoretical ability to store an infinitely large number (IE: if the hard …

Member Avatar for Labdabeta
0
299
Member Avatar for J-P1988

Hey i try to work on custom signal but i get an compiling error: QObject::connect: No such signal QLabel::changerSignal() in ..\textbasedrpg\FenPrincipale.cpp:173 But i seem to write exactly same thing in header and .cpp »That an big moment i try to see what i do incorrect but can't find. Same an …

Member Avatar for Banfa
0
494
Member Avatar for irtza

These are two simple programs. In first program, i used static array, while in second program i used dynamic array. Both programs do the same job i.e. initiaze the array by asking the user to enter the their test scores. The problem is: 1)i have read in many books that …

Member Avatar for vijayan121
0
4K
Member Avatar for sireiz

I wrote a simple c++ program which takes a password and then shows a message for the intended person. Now i want to crack this program with another c++ program by using password cracker. How to use another c++ program to brute force this program?

Member Avatar for Suzie999
0
83
Member Avatar for Asus93

[Click Here](http://s1146.photobucket.com/user/HTHVampire/media/C%20plus%20plus/Capture2_zps4d967f99.jpg.html) Here's the formula to compute sinx and cosx in C++. here is the code I wrote at first to calculate it: http://codepad.org/cbdGB8wL and it gives me good results. The problem is my lecturer would prefer me to use the formula as attached , but I get stucked, how …

Member Avatar for Asus93
0
679
Member Avatar for Labdabeta

Hello, As may be apparent from my previous posts, I am in a "If its worth doing, its worth overdoing" sort of competition with a friend of mine. Our goal is arbitrary precision integer arithmetic. I think I am close to getting the data storage working, but now I want …

Member Avatar for Labdabeta
0
990
Member Avatar for n.cramp

Ive actually managed to get DirectX 9 working with Direct X, however i am now getting odd error messages around a function. I can't see any syntax issues myself but thought i'd check to see if anyone can shed any light on it. `g_pd3dDevice->CreateVertexBuffer( 3 * sizeof(CUSTOMVERTEX) , 0, D3DFVF_CUSTOMVERTEX, …

Member Avatar for n.cramp
0
303

The End.