48,986 Topics
| |
I am currently creating a queue ADT for one of my classes in college. We are using a linux ssh server for compiling our programs, but i am writing the code in windows. When i compile i get no errors, but when i run it goes fine until it hits … | |
Hello, I am a first year Comp Sci student and i am trying to finish this program. I am almost done with it but i just can't figure out one thing which is that, how do i show the initial principal amount under Principal heading in loop? the initial amount … | |
can anyone explain the purpose of a tracking reference vs native reference in c++/CLI? | |
I have an assignment to take the functions and use array subscripting and pointer arithmetic to write the functions. int stringLength(const char* s); char* stringCopy(char* s1, const char* s2); char* stringConcatenate(char* s1, const char* s2); and use the following tester driver: but I have no idea where to start when … | |
Hi, In brief, I have written a program in C++ that reads data from a text file, does 'stuff' with that data and then writes the results to a number of separate file. Separately I've written a simple GUI for this program using Visual Basic (allows the user to select … | |
Hi .. I have this program, its reding correctly but its not doing what i want i.e. it suppose to read the input file and call the functions according to the action saved in the file this is the problem : [CODE] #include <iostream> #include <Fstream> using namespace std; void … | |
hi all no really sure where to begin, my uncle owns a signage company he has been given a job where he needs to create a large billboard with a screen to look like a slot machine to be in the center of the shopping center, when customers have bought … | |
Hi, I am trying to work on creating a linked list of player in a game, but I have not written code in a while and have no idea what I am doing wrong, can you please help with suggestion of what I did wrong or idea of how can … | |
If i try to store character in an integer variable...the programs shows error...it repeats certain statements indefinitely... i want that if i try to store character in an integer variable...it should prompt the user to enter integer again...lz help | |
Hi guys, im workin on a little text based RPG using c++. It is a win32 comsole application and i am wondering what i could do to improve it! I have added my source code [code] # include <iostream> #include<ctime> #include<cstdlib> #include<cctype> using namespace std; struct monster { int strength; … | |
Last year I built a generic list, everything was good. This year I'm adding classes to the list. These classes have lists. Everything is okay until the program ends, then it crashes. If I comment out my list destructor the crash doesn't happen. So I'm assuming the destructors aren't unraveling … | |
i need help in making the size of the array to n size in queues.i have made a program help me in it. [CODE]////##############///// #include <iostream> using namespace std; #define MAX 5 class queue { private: int t[MAX]; int al; int dl; public: queue() { dl=-1; al=-1; } void remove() … | |
[CODE]#include <iostream> #include <string> using namespace std; //char inventoryRequest = 'i'; //Function Definitions. void displayInventory(); void inventory(); void exitGame(); int playGame(); int main() { //Menu Text. cout<< "\t******Menu******\n\n"; cout<< "Please choose one of the following:\n"; cout<< "1 -Play Game.\n"; cout<< "2 -Exit.\n"; int choice; cout<< "Choice: "; cin>> choice; string … | |
Below is my code. My assignment is to write a code to ask the user to enter the amount of people in the class between 1 and 25. Then enter that many names and it will list the first and last name alphabetically. ex. jon matt kate = jon matt … | |
Greetings, I'm hoping that i can get some help on an exercise I'm doing dealing with multidimensional arrays. I want to move around a board and calculate how many steps I've taken on the board. Input asks for the seed number and how many steps to take. I just don't … | |
Hello All, Not sure this is the right forum, but I have a Visual Studio question. I am used to using code::blocks as an IDE. My current instructor likes to use Visual Studio 2008, so I am trying to adjust. One big difference I have found is that when a … | |
I'm a C++ student, and I'm almost there on this assignment, except I can't get the search function to work correctly. The search function should accept a search input from the user, then list all the items related to that input. In this case, its all the tasks related to … | |
Hey all, I'm fairly new to C++ and am trying to write a program that continues asking the user for a number until "0" is entered. I am supposed to count the number of positive, negative, odd, and even numbers that the user has entered once the program is terminated(0 … | |
Hello! Im writing a program that outputs some triangles and such. And I want to count the written *s. If anyone would help i would really appreciate it. Code: [CODE]#include <iostream> #include <string> using namespace std; int main() { char znak; znak = '*'; int st_vrst = 0; int ploscina_trikotnika, … | |
I am a newbie who just graduated. I found my first job and begin to review some legacy codes And I find out there are a lot of macros which could be replaced by function (somebody especially c coders may think macro is a better choice) Not even that, I … | |
In writing a logging program for a SDK Engine, I have come across some problems. The logging function works fine when called with test programs, but when I run it in a full test of the SDK Engine, no file is ever created. I added some testing lines to make … | |
Please take a look at the following code. When I do not put my pointers in an array the code works. See the commented out section. I thought it would be nice to do an array as I could then have more control over my output. I could also add … | |
I'm having a bit of trouble figuring out what i'm doing wrong with my overloaded operators Header file [CODE]#ifndef SavingsAccount_H #define SavingsAccount_H #include <string> using namespace std; class SavingsAccount { friend istream &operator >>(istream& input, SavingsAccount & ); friend ostream &operator <<(ostream& output, const SavingsAccount & ); public: SavingsAccount(); SavingsAccount(string, … | |
I'm new to generic programming and I just cant figure out what is wrong in this . The program is supposed to make a linked list using class. I have used 2 classes so that a single object of class LL can be used to manipulate a linked list . … | |
Hey all I need to convert audio file of wav format into text file in order to feed it as input to an encryption algorithm(IBE encrypt method of [URL="http://www.shamus.ie/"]Miracl[/URL] library takes only texts as input) and have to reconvert the decrypted text file to audio format. Could you please suggest … | |
I am having a problem with trying to copy a "char array to an int array". I have a code to randomly picked an amount of character and (in progress) print out how many occurrences, even if it's not in there a letter has. For now I'm only doing upper … | |
Well I noticed recently that the more unusual bool operators arnt there. How would I use them? Ex: xand, NAND, nor, etc. | |
plz help me to know..whether this pointer in c++ is public access or private access | |
[CODE]struct ch8_struct { int field1; short field2; char field3; int field4; double field5; }; struct ch8_struct g_StructArray[3]; ch8_struct *g_pStructArray = g_StructArray; ch8_struct **g_ppStructArray = &g_pStructArray; g_ppStructArray[1]->field1 = 11;[/CODE] program is crashing on g_ppStructArray[1]->field1 = 11; i think my pointer notation is wrong :) | |
I'm getting the error for the following code "error C2664: 'KaibaMainPhase' : cannot convert parameter 1 from 'void (__cdecl *[2])(std::vector<_Ty> &,std::vector<_Ty> &,std::vector<std::vector<_Ty>> &,std::vector<_Ty> &,std::vector<_Ty> &)' to 'void (__cdecl *)(std::vector<_Ty> &,std::vector<Card> &,std::vector<Card> &)" [CODE]class Card { public: string GetName() {return Name;} void SetName(const string& setName) {Name = setName; } void SetType(const … |
The End.