49,757 Topics

Member Avatar for
Member Avatar for Pappu-Linux

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 …

Member Avatar for SasseMan
0
124
Member Avatar for oggiemc

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) …

Member Avatar for oggiemc
0
91
Member Avatar for titanelamo

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 …

Member Avatar for parajovi
0
110
Member Avatar for chamika.deshan

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?

Member Avatar for chamika.deshan
0
2K
Member Avatar for sharifyboy7

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 …

Member Avatar for SgtMe
0
165
Member Avatar for stubee_1975

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

Member Avatar for stubee_1975
0
207
Member Avatar for SheepGotoHeaven

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 …

Member Avatar for Ancient Dragon
0
149
Member Avatar for mrar85

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 …

Member Avatar for SgtMe
0
165
Member Avatar for MuniArt

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 …

Member Avatar for innnocentdevil
0
470
Member Avatar for nagarajr.mysore

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 …

Member Avatar for Ancient Dragon
0
143
Member Avatar for silversurfer515

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 …

Member Avatar for jonsca
0
276
Member Avatar for jae5086

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 …

Member Avatar for jae5086
0
112
Member Avatar for brandonrunyon

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 …

Member Avatar for brandonrunyon
0
265
Member Avatar for abewin

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 …

Member Avatar for abewin
0
966
Member Avatar for chege kamundia
Member Avatar for Nick Evan
0
83
Member Avatar for BonnyBonny

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!

Member Avatar for geethasree
0
128
Member Avatar for Ultraviolet

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 …

Member Avatar for Ultraviolet
0
103
Member Avatar for nikhilsamkumar

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

0
46
Member Avatar for shakssage

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 = …

Member Avatar for jonsca
0
141
Member Avatar for eagles39

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: …

Member Avatar for jonsca
0
97
Member Avatar for Bri426

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 …

Member Avatar for SgtMe
0
1K
Member Avatar for brycematheson

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 …

Member Avatar for WaltP
0
122
Member Avatar for TheebanRaj

Hi,friends...let help me to find relationship between 7404 and 1198..thanks

Member Avatar for WaltP
0
37
Member Avatar for maryamwiki

Any one can help me plz in writing programme to convert infix into postfix number

Member Avatar for SgtMe
0
31
Member Avatar for raider650

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 " << …

Member Avatar for raider650
0
72
Member Avatar for qvyhnl

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 …

Member Avatar for qvyhnl
0
110
Member Avatar for lochnessmonster

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 …

Member Avatar for mike_2000_17
0
186
Member Avatar for brycematheson

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 …

Member Avatar for Greywolf333
0
696
Member Avatar for rlhh

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 …

Member Avatar for rlhh
0
201
Member Avatar for jmcorpse

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 …

Member Avatar for daviddoria
0
99

The End.