49,761 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 " << … |
The End.