49,757 Topics
| |
Hello Everybody Here !! I'am a noob to programming, i am having problem in understanding the STACKS in C++, I'm just confused that how to Delete a Value From Stak, How to count The Top and One More thing How to Transfer the values of One Stack into another by … | |
Hi, Suppose i have an animal base class and cat derived class..I create animal.cpp, animal.h, cat.cpp, and cat.h files...Assuming i have included Animal.h in my Cat files, what files do i have to include in the main.cpp file? is it just: 1) #include "Animal.h" or do i also include: 2) … | |
I am using VisualStudio.net edition for my compiler, and the application is to PocketPC. When I link recive this error. [CODE]LNK2019: unresolved external symbol WL_HMAC_SHA1 referenced in function F c:\Projects\redim\wzcsapi.lib fatal error LNK1120: 1 unresolved external Windows Mobile 6 Professional SDK [/CODE] This error in theory is because: - Calling … | |
Hello In java I could keep static arrays like following. class Test { public static int myArray[10]; } Those arrays are static for any class. In C++ how could we do this? | |
Program Requirements: Let A be an array of n elements. Write a template function that takes an unsorted array of type <class T> as an input parameter and feeds back a sorted array via the input parameter. Assume the operators < and > are defined for the class T. In … | |
Ok I've created the class Weapon below and I now want to create a vector of Weapons, how do I do this? class Weapon { public: Weapon(); // Methods private: // Data members. std::string mWeaponName; int mDamage; float mCost; }; #endif //WEAPON_H | |
The assignment Im working on involves creating a database of employees and outputing some basic information about them. Im having trouble in my header class files. the error i get is "[B]error: passing 'const Owner' as 'this' argument of 'double Employee::getSalary()' discards qualifiers[/B]" I think its the way im passing … | |
i have a problem regarding functions. this leap year code is frustrating because it will always give me "not a leap year" whenver i entered a year: [CODE]#include <iostream> using namespace std; int get_input(); bool CheckLeapYear(int); int main() { int year,x; char key; do { year=get_input(); cout<<CheckLeapYear(x)<<endl; cout<<"Press 'y' to … | |
I've looked all over and haven't found an answer on this that I can understand. I included my code (most of it, anyway.) Obviously, I'm trying to make class Square a subclass of class Rectangle. However, I can't get my display() method to work properly in the derived class. The … | |
can any one give c++ program to eject cd from cd-rom, i am getting error in this program please solve this [CODE] // use mciSendString() to open and close the CD-ROM door // you have to link with the winmm.lib file, or // in the case of Dev-C++ link with … | |
Hey guys, Does anyone have a simple program which can be compiled on visual studio 2010 for windows that opens a socket to a given webpage and allows you to read the html just as you would with a local file? I don't want a html parser, I just wish … | |
Ok I have tried a few ways to get this loop to terminate before using the ending variable in the function but I cannot seem to figure it out. This is just my latest attempt. I want this program to end when the user enters 0 but it always returns … | |
I have a class "Homework" that has a private attribute "int time" and I have set up a + operator to add the times of two Object instances. I have also created a Template "sum(T a, T b)" that takes two arguments and adds them together. I'm having difficulty using … | |
Firstly, i press ENTER to exit the 1st do..while loop and then the programe ask Rent Paid(y/n): if i press n and then ENTER, the program return rent_step2, and it is supposed to wait for me before i press ENTER again But it just break the 1st do..while loop and … | |
Explain real life application for heap and tree data structures | |
Please could you show me how to use stakcs and queue to create a program that divided letters (a,b,c,d,e...x,y,z) by vowel and consonant letters.We have two stacks:in first should be vowel letters and in second consonant letters. Thanks in advance! | |
Hello all. I used [CODE]Directory::GetDirectories()[/CODE] and [CODE]Directory::GetFiles();[/CODE] to search the file system. Normally, I got an Unauthorized Access Exception which I caught using a try\catch block This didn't ignore the exception and kept failing when facing a System directory, but only without throwing the exception. I used this (If) to … | |
I have an elevation map, from that i will get slope values,but wat my idea is to generate the polygons of 0-10 range slope values ,10-20 slope values .... like that.. i.e vector polygons .. please help me .. im in deep trouble | |
Hi, I cant seem to convert the following into vc++ from vb.net. [CODE] Dim i As Integer Dim address As String = myReader.Item("Address") Dim addresses() = address.Split(" ") Dim secondPartIndex As Integer For i = 0 To addresses.Length - 1 If Regex.IsMatch(addresses(i), "^\D{1,}$") And secondPartIndex = 0 Then secondPartIndex = … | |
I am getting one error in this assignent and I am trying to find how i can seperate the total number of problems correct for each operator. I also get an error message but i cannot use a global variable or it is a 0 on the assignment. ERROR MESSAGE: … | |
I'm learning about arrays in my C++ class and am having some trouble with them. We have an assignment that states: Write a program that will: (1) Ask the user how many times a simulated pair of dice should be thrown. (2) Ask whether the user wants to see each … | |
I'm creating a Tic-Tac-Toe game. Well, at least the beginnings of it. Currently, I'm trying to read a game board from a file, display it to the screen, and then write the contents back to a different destination file that the user selects. My problem is this: when reading the … | |
Hi,friends...let help me to find relationship between 7404 and 1198..thanks | |
Any one can help me plz in writing programme to convert infix into postfix number | |
How would I output this into: int main() I've tried: int main() { PostTemperatures; } [CODE]struct WeatherStation { string StationName; double Temperature; }; void PostTemperatures(WeatherStation BigBasin,WeatherStation Foothill, WeatherStation DeAnza, WeatherStation MiddleField, WeatherStation RedwoodCity) { cout<< "Enter reported temperatures..."<<"\n"<< "\n"; BigBasin; BigBasin.StationName = "Big Basin"; cout << "Weather Station " << … | |
Problem: write a function that returns a pointer to the maximum value of an array of double. I have written the code that return the maximum, but I don't know how to turn it into a pointer and return it =.= [CODE]#include <iostream> #include <string> using namespace std; const double … | |
How do you all feel about class composition? say im making a class i would want to publish to the public for use...well if i perform class composition this means i would also have to implement the other classes/structs so the programmer can even properly use my class. Im just … | |
I'm writing a program that will eventually be a Tic-Tac-Toe game, but as for now, I just want to get the layout done. Right now, all it does is read the game board from a file, display it, and then ask you where you want to save it afterwards. I'm … | |
First of all, thanks for any help that I'll receive. Now on to the question. I'm wondering how do I create an array of an object in C++? I've done this in Java before but I've got no idea how to do it in C++. [CODE] import Accout.java private Account … | |
I need some assistance with my code. I figured it out and have it working for the most part. I just need some help in the carrying function where all the numbers that where added we carried over with paper and pencil type arithmetic. My biggest problem now is trying … |
The End.