49,761 Topics
| |
How is the working of member function different from friend function and a non member function? plz do tell me.. | |
Write a program having a base class Student with data member rollno and member functions getnum() to input rollno and putnum() to display rollno. | |
i want to frd the[COLOR="Green"][B] MainControl[/B][/COLOR] with the derived class [COLOR="Green"][B]food [/B][/COLOR] [B][COLOR="Green"] objects.h (abstract base)[/COLOR][/B] [CODE=C++] #include "maincontrol.h" class objects {...}; [/CODE] [B] [COLOR="Green"]food.h (derived)[/COLOR][/B] [CODE=c++] #include "objects.h" using namespace std; class food: public objects {...}; [/CODE] [COLOR="Green"][B]maincontrol.h[/B][/COLOR] [CODE=c++] class objects; class food; class MainControl { public: friend objects; … | |
Write a template class “binary_tree” in C++. The class should have functions for creation of the tree, insertion and deletion of an element, searching a key value in the tree, Post order traversal and output the value in ascending order. Make suitable assumptions, if any. | |
Hi... I am a bit new to programming, and I'm trying to learn C++. I was wondering if there was a way to copy the contents of one variable into another... So that, for example: [ICODE] int x=5; int y; (Some fancy code here involving x and y); (y=5 but … | |
what is the =' : left operand must be l-value means? error C2106: '=' : left operand must be l-value [code=C++] #include <iostream> // std::cout #include <fstream> #include <iomanip> #include <string> // std::string #include <vector> // std::vector<> #include <algorithm> //std::for each() using namespace std; // import "std" namespace into global … | |
Assignment - [url]http://condor.depaul.edu/~ntomuro/courses/262/assign/hw2.html[/url] [code]Write a class called Loan, which simulates the money you borrow from a financial institution, and a main function (i.e., an application program) which tests the class. You write ONE file, which should be named "myLoan.cpp". 1. Class Loan The class Loan should have the following members: … | |
I am trying to solve a problem from a lab challenge. I can not get the program to compile correctly. Please look over and let me know where I need to be looking to solve this Use a two-dimensional array to solve the following problem. A company has four salespeople … | |
I have in my code two separate arrays to store values, uCurve and vCurve. Both are arrays of pointers to math vectors: [code=cplusplus]Curve uCurve, vCurve; uCurve[0] = &(bezcurveinterp(cP[0][0], cP[0][1], cP[0][2], cP[0][3], v).p); uCurve[1] = &(bezcurveinterp(cP[1][0], cP[1][1], cP[1][2], cP[1][3], v).p); uCurve[2] = &(bezcurveinterp(cP[2][0], cP[2][1], cP[2][2], cP[2][3], v).p); uCurve[3] = &(bezcurveinterp(cP[3][0], cP[3][1], … | |
Hi! I have this function (well, it's pretty good explained in the code-tag, but okay.) which is supposed to see if a string is found first in a line in a text file. Anyway, this code gives the message (while running in debug mode in MSVC++): "Debug assertion failed. Expression: … | |
I opened the command promt inside VC++ and this solved it. I have encountered a problem. When I compiled a program it came up an Error Message and the VC++ 2008 Express Edition was closing. When open VC++ again and press on my project that I work with. This message … | |
It has been a long time since I have used C++ (I am only 20, so maybe not that long) I have been using several languages in the last couple years(Java, ActionScript2 and 3, PHP), polluting my mind with many different idioms, and now need to hop back to C++. … | |
So I know how to delete a descriptor from an array, but I can't seem to edit the code to add a new line to the data. The line consists of a name, one space, and then a 3 digit number. I was wondering if anyone could help me edit … | |
I am trying to firgure a way to store test scores to a arr or something so i can sotre 20 different scores and twenty different possible points values. but i cant seem to get it right i have almost everything done acept storeing the vales so i can recall … | |
ok i have this program dealing with date Class. im having trouble with the overloaded operator % which returns a date with smallest component month, day, and year for two given dates. your help is very appreciated. For Example: d1 is May 5 , 1942 d2 is August 1, 1970 … | |
hello all im having trouble with entering data in arrays that are in a structure i was given a task to write the code for the following: 1) define structure tstudent that has the following info about students ---index number (int) ---name (char) ---age (int) 2) define structure tgrades that … | |
I'm solving a problem and am near completion but am having one little problem. I'm about to show the coding that i have but i need to make name, age, and weight value returning functions as well. You'll see what i mean. [code=cplusplus] int main() { Class secretType { Public … | |
I need to write a program, that if anyone ever played memory when they were younger does exactly that, that asks a user for 8 numbers. the numbers the user inputs need to be scattered across a 4x4 array. for example if a user enters 4 there need to be … | |
this is simulated data on daily vehicle traffic crossing a bridge for one week. From Monday through Sunday the daily vehicle counts were {986, 818, 638, 763, 992, 534, 683}. Create an input file named cars_data.dat containing these numbers. Write a program that will read these values from the input … | |
Hi I have been programming for about 3 weeks now and am really starting to get somewhere with it, but I have encountered a problem with this text rpg that I am making, the problem is I have made 3 header files being 1.character(contains character class) 2. monster(another class file … | |
for some reason I cannot add integers in an array of structures. here is the code. [CODE=c++]#include<iostream> #include<iomanip> using namespace std; const int SIZE = 5; struct playerInfo { char name[30]; //Players name int number; int points; }; int main() { int total = 0; // to hold total points … | |
Hi, I've question regarding visiting and printing nodes for tree traversal. the main purpose of my program is to create tree for an arithmetic expression and then perform in-order and post-order traversal on the tree. The structure tree need to be hard-coded in the program using linked-list/pointer stored in one … | |
hello all i wrote the a dll using vb 6.0 this dll only has this function: Public Function Impresion(ByVal Nombre As String) Printer.Orientation = vbPRORLandscape Printer.ScaleMode = vbInches Printer.Font = "Arial" Printer.CurrentX = 0.5 Printer.CurrentY = 1 Printer.Print Nombre MsgBox Nombre Printer.EndDoc DoEvents End Function the dlll works fine when … | |
[url]http://www.samair.ru/scripts/[/url] with sockets ? | |
hello everybody I need your help please I have Q for u write C++ code to display all emrip numbers between 2 and 1000 and returns their count to the program | |
i have a text file that has delimiter. i wanted to display the test file that will take away the deliminter from my text file. i search through the net was told to use getline() which can include the deliminter. Hope that is someone who can show me an example … | |
Hello, I've been Google'ing(?) like crazy for the last hour or so trying to find an answer to my problem, however the problem is simply that I'm not too sure [i]what[/i] to search for :S My basic problem is that I want to change the default way in which the … | |
I am taking a introduction to C++ programming class in college and I am having some issues with my assignment. If anyone can help It would mean a world of diffrence to me. Thanks in advance. Okay the assigenment is to write a program that simulates the lottery, the program … | |
Can anybody help me whis this error? in red colour... error C2109: subscript requires array or pointer type error C2109: subscript requires array or pointer type : error C2109: subscript requires array or pointer type error C2664: 'void __cdecl std::swap(int &,int &)' : cannot convert parameter 1 from 'int' to … | |
my final assignment is about making a program like a TinyGoogle.. But actually, i'm just a Freshman and it's kinda hard to have all the knowledge to make these all through.. Hope u guys can help, thanks a lot [URL="http://kalodakilla.googlepages.com/CS162-Final-Project-TinyGoogle.pdf"]http://kalodakilla.googlepages.com/CS162-Final-Project-TinyGoogle.pdf[/URL] The first problem is that i dont understand what does … |
The End.