49,761 Topics

Member Avatar for
Member Avatar for kyros

hello.I have an C++ assignment I have to find a path to exit from maze.I should read the maze from a file and write it to an array..but I couldn't do it.can you help me,can you give the code to do that and which headers should I include,please answer me …

Member Avatar for SgtMe
-1
376
Member Avatar for Vv IVIatthew vV

well, i'm writing a text-based game, and my 'NameEnter' function is acting up, basically, if you confirm that the name that you input is correct, it works fine, but if you type 'no' or something else, it doesn't accept the name reentry, i am not sure exactly what i have …

Member Avatar for SgtMe
0
144
Member Avatar for lynneh3979

I need to create a structure related to an overtime pay calculator and define the variables needed within the structure to do those calculations. Then define and create a base class using the same variables that may serve the same function as the structure This is as far as I …

Member Avatar for geethasree
-1
129
Member Avatar for russellquin

I'm new to c++ and I want a variable that represents fuel to stay zero even if/when the program tries to subtract from it. The problem is that sometimes it becomes a rather large number. I am guess that the variable is looping to the highest number that it can …

Member Avatar for Duoas
0
88
Member Avatar for Annettest

Hi everyone: I would appreciate some help with understanding how to free memory/use destructors. I have created a 2D dynamic array template class. I'm using Xcode and Xcode keeps crashing, with the message, "out of memory." Before I implemented this array class, I was using "new" directly within main() to …

Member Avatar for Annettest
0
2K
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
166
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
144
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
266
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
969
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
146
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

The End.