48,986 Topics

Member Avatar for
Member Avatar for Stefano Mtangoo

Hello people, I have two classes everyone with private data. I want only one function from each class to access private data from another class. I have checked "friend" function but It needs the class object as an argument. That is making things complicated on my side and I have …

Member Avatar for sheff_cc
0
1K
Member Avatar for JHus00

I want to call the input function, which works when I run it, but then I want to display the "temp" and "windspeed" variables in the main function and I don't know how to do this, im looking online at tutorials but im still confused. I guess I shouldn't have …

Member Avatar for Fbody
0
186
Member Avatar for DARK_BYTE

Hi I am trying to answer this question for my homework: [QUOTE] Populate a text file EmployeeDetails.txt (for 20 employees) with details of each employee on a single line. Details of an employee will consist of Name, Address, Age and Salary. Write a C++ or Java program to implement an …

Member Avatar for Clinton Portis
0
107
Member Avatar for turrence27

okay so im new to programming and have an assignment im not sure how to do the question is. The original U.S. income tax of 1913 was quite simple. The tax was [INDENT]1 percent on the first $50 000[/INDENT] [INDENT]2 percent on the amount over $50 000 up to $ …

Member Avatar for WaltP
-1
1K
Member Avatar for logicmonster

This is a program that is meant to be a dice game with the computer, and this is what I have so far. I'm trying to make sure that I'm doing it right but I can't compile it to check because of a syntax error near the end of the …

Member Avatar for WaltP
0
173
Member Avatar for wwsoft

hello , Im creating a top down game. Id like to know what is the formula for moving X and Y values N pixels in a specified direction (0-360) ? [CODE] int x=0; int y=0; int speed=3; // "n" int direction=45; //some formula ... //output x=3; y=3; [/CODE]

Member Avatar for wwsoft
0
86
Member Avatar for prockaz

Program not running I'm not sure of he problem [code]//Employee.h #ifndef CLASS_H #define CLASS_H class Employee { protected : char *firstName; char *lastName; public: Employee (); Employee ( char, char ); //accessors //retrieve const char *setfirstName (char); const char *setlastName (char); //mutators //return const char *getfirstName (char); const char *getlastName …

Member Avatar for thomas_naveen
0
284
Member Avatar for aallan

Hi, I wish to create a very simple GUI for my C++ code I have written a simple C++ program using Microsoft Visual C++ Express. The details of the program functionality are not really important. Currently the user enters a number (1-5) on the command line and presses enter. A …

Member Avatar for Stefano Mtangoo
0
428
Member Avatar for Stefano Mtangoo

Sorry guys, I know it is not C++ specific, but Wikipedia confused me. I have devoted a little time to look at programing tools and little on their innner workings. This term have boggled my mind. So any explanation on what this animal is? Thanks

Member Avatar for Stefano Mtangoo
0
72
Member Avatar for Cristofor

Hello, I just start to learn c++. what I'm using is visual c++ express edition. here is the source code: --------------------------------------start [CODE]#include <iostream> using namespace std; template <class T> class pair { T value1, value2; public: pair (T first, T second) { value1=first; value2=second; } T getmax (); }; template …

Member Avatar for Cristofor
0
1K
Member Avatar for techie929

// error: expected constructor, destructor, or type conversion before '*' token *** Error code 1 make: Fatal error: Command failed for target `bst.o' [CODE] class BinarySearchTree { private: int count; int n; struct tree_node { tree_node* left; tree_node* right; char data[1000]; }; tree_node* root; public: BinarySearchTree() { root = NULL; …

Member Avatar for mitrmkar
0
109
Member Avatar for SearchDS

Hello I have been trying to make a function that can send the output data or any text to a network printer, I read many articles/posts about it but nothing is working, have been looking for almost a week... Whenever the program tries to use the printer function, it either …

Member Avatar for SearchDS
0
2K
Member Avatar for FatimaRizwan

This is the operator overloading for the polynomials doubly linked list , this code is working fi9 but i m getting repetition like 1x^1 2x^2 when added with 1x^1 3x^6 2x^1 2x^2 3x^6 but i get those terms also which are subtracted already like i get 1x^1 2x^2 1x^1 3x^6 …

0
60
Member Avatar for RooiBaard

Good day. I am attempting to write a C++ Program than must open a text file with random caharacters and then convert these characters into readble text. It must also be able to do the reverse Example like: If the text file has "%&^#)@!#@" It should convert that into "Hello …

Member Avatar for vidit_X
0
121
Member Avatar for safder00

How to create simplest IME-aware application? I’m a beginner and don’t know anything about IME-aware applications, please, give me complete code of a simplest IME-aware application. Thanks in advance.

0
40
Member Avatar for noey699

I am designing a artificial life simulator atm and it would be very useful if I could pass any statement as an argument. For Example. [CODE]LoopStatement(X += 2,50)//loop statement 50 times //or LoopStatement(X += 2 * Speed,75)//loop statement 75 times[/CODE] I know the for loop has something like that. Also …

Member Avatar for timtaylor
0
88
Member Avatar for logicmonster

I have a program that a friend wrote for me in Java, however I'm trying to put it in C++ and I don't know Java myself. Does anyone know somewhere that I can get it translated? Or maybe someone who has time to translate it themselves? It all looks vaguely …

Member Avatar for javaAddict
0
184
Member Avatar for clutchkiller

[code] #ifndef BASE_H #define BASE_H class base { public: base(); struct baseInfo { int SlotCount[4]; }; private: protected: }; base::base() { } #endif [/code] This is my header file, but how do I access the struct and its members through an object of the base class(through main)? I cant find …

Member Avatar for clutchkiller
0
90
Member Avatar for lanilonzo

Hi All, I am working on adding additional functionality to an existing legacy code. In that code, I have a function which returns a pointer to an object of a parent class. I know that this object is actually a subclass of the parent class, and would like to access …

Member Avatar for StuXYZ
0
83
Member Avatar for MJaske

Hello everyone. Home help = homework help :) can't change it now I'm running into an error, expected initialize before "int menu()" I have been playing around with it for a bit but I have not figured out how to get rid of the error. When I think I got …

Member Avatar for thomas_naveen
0
158
Member Avatar for naitsirk

hi! can u help on my 8 x 8 c++ project??., For example, suppose the cards are in the following layout: 1 2 3 4 5 6 7 8 --------------------------- 1 | 8 * * * * * * * 2 | * * * * * * * * …

Member Avatar for StuXYZ
0
85
Member Avatar for corby

any help would b greatly appreciated for the following how do i modify this to output the date in multiple formats: a)DDD YYYY MM/DD/YY June 14, 1992 b) use overloaded constructors to create Date objects initialized with dates of the formats in part (a). c) create a date constructor that …

Member Avatar for corby
0
155
Member Avatar for techie929

//when I delete root node from bst the below code is showing segmentation fault,Please tell where should I change the code [CODE] void BinarySearchTree::remove(char* d) { //Locate the element bool found = false; if(isEmpty()) { cout<<" This Tree is empty! "<<endl; return; } tree_node* curr; tree_node* parent; curr = root; …

Member Avatar for VernonDozier
0
81
Member Avatar for Der_sed

Can someone please suggest me a psuedo code to extract sub problems from an arithmetic expression: For example, How do I remove (8*2) and (3+2) from a given string (5 + 6(3+2) - 2(8*2) +1) Input string will always start and end with paranthesis and the sub problems must be extracted …

Member Avatar for WaltP
0
83
Member Avatar for rwill357

I had to pick one inefficient and one efficient sorting methods, then implement them in a c++ program: Generate 100,000 or any proper number of random integers and store them in an array I have comprised two such function and just want to ensure I'm meeting specifications. Please see attached …

0
57
Member Avatar for whaug000

Problem Description In this assignment you are to write a program that encrypts an entire string, which could be multiple lines of text. Use the encrypted formula from last assignment to perform the encryption. The program will ask the user for a string to manipulate. The original string will then …

0
39
Member Avatar for Frederick2

Recently I've been looking into BSTRs, and have found how 'touchy' they can be. I saw this in a COM class in the class destructor regarding a m_strBStr member... [CODE] if(m_strBStr) SysFreeString(m_strBStr); [/CODE] When I saw it I thought, "How would the BSTR have a zero assigned to it?", because …

Member Avatar for Fbody
0
145
Member Avatar for yznk

Your assignment is to modify the program so that the aimless walker stumbles around in a 2-dimensional grid, such as the streets of Manhattan. Your program should prompt the user to enter the number of rows and columns in the 2-d grid. Again, have the walker start in the middle …

Member Avatar for jonsca
0
105
Member Avatar for nats01282

Hello i am watching some tutorials on [URL="http://www.3dbuzz.com/vbforum/sv_showvideo.php?v=27"]3d Buzz[/URL] and intro to C++ starts by saying that [CODE] #include <iostream> main () { std::cout << "hello world!" << std::endl ; } [/CODE] should show a CMD like window saying Hello World! On the video they try it and it works …

Member Avatar for nats01282
0
145
Member Avatar for mushroozard

Hello guys i was wondering if someone could please post me a full FTP or SMTP uploading source code in C++ with all i need to #include.I just need a simple code to upload a file to my ftp server or send it to my mail.I searched the whole place …

Member Avatar for Fbody
-3
249

The End.