49,757 Topics
| |
[CODE]#ifndef ARRAYLIST_H #define ARRAYLIST_H #include <iostream> using namespace std; template <class ItemType> class ArrayList { public: enum SortOrder {ASCENDING, DESCENDING}; private: typedef ItemType* pItemType; typedef pItemType* ppItemType; ppItemType items; size_t count; // Finds the index of the next item in order. size_t FindNextIndex(const int start, const SortOrder order) const; // … | |
I have had this problem many times and I have never been able to get my while loops corrected, hence the reason I never used them, so maybe I need a professional solution to the problem. I never really got classes on how they worked, although they had some relevance … | |
Hey everyone,I am trying to solve a problem but it's pretty difficult for me, and I thought that someone will can help me: So I am given this problem: By starting at the top of the triangle below and moving to adjacent numbers on the row below, Find the maximum … | |
So I guess I'm curious, what are DLL's(Dynamically linked libraries right?), and what are they used for and why? And what exactly is a kernal? Its a program that communicates between software and hardware right, and would a regular programmer ever right a kernal program?? I'm just looking for a … | |
My project currently takes 16 minutes to compile. Is there anyway that I can reduce the compilation time significantly? | |
Hello, everyone. I'm trying to learn MFC so I can create GUI's for a few projects I have in mind. I could really use your help with a few basic problems. I'm attaching a screenshot of my appointment book main window and the other dialog that shows after the ADD … | |
[CODE]#ifndef SORT_LIB_H #define SORT_LIB_H template <typename T> class Sort { private: static int FindNextMinIndex(T arr[], const int start, const int length); static void Swap(T arr[], const int index1, const int index2); public: static void SelectionSort(T arr[], const int length); }; template <typename T> int Sort<T>::FindNextMinIndex(T arr[], const int start, const … | |
hi i have a question about C++. if anybody could pplease help me out id highly appreciate it. this is what i am trying to do and honestly I have no idea how to do it or how to go about it: Write a C++ program that does the following. … | |
node &getNode(int index) { //NOT TESTED if (index <= getLength() || index >= 1){ temp = new node; temp = head; for (int i=index-1; i>0; i--){ temp = temp->next; } return &temp; } } Hi everyone, I receive this error msg: invalid initialization of non-const reference of type 'node&' from … | |
How would I write this? I am new to C++ and am trying to write this but don't really have any idea how? I tried to outline it first so I could do it step by step, but now that I have outlined it I am stuck one how to … | |
Hello everyone, I'm new and I have next to no experience with c++ and I wish to learn. So, these questions may seem ridiculous, and they probably are but, please answer. What is a game engine and how to make one (in a nutshell)? How long, if I have no … | |
Hello, I have a program I am writing to count the number of integers (as well as the individual digits) in a file. I feel I'm close but I'm not quite there so any insight would be helpful. I'll only post the segments of code relevant to where I need … | |
Hello all, Got a small problem I'm trying to figure out an obscure error (to me). What I'm trying to do is implement error handling with a loop count within a while statement for two sets of Menus in my Hangman game. Perhaps you all can lend me hand in … | |
hello guys and hope you are fine :) please take a look to this code [CODE]#include <iostream> using namespace std; int sum(int num1,int num2, int sum1){ cout <<"Please enter two numbers:"; cin >> num1 >> num2; sum1 = num1 + num2; cout << sum1; return 0; } int div(int num3,int … | |
[CODE] #include <iostream> using std::endl; using std::cout; using std::cin; int main() { long long i=0, j=0,k=0,m=0; cout << "which primary number you want to get .? " << endl; cin >> k; bool isPrime = false; cout << "Prime Number : " << endl; for(i = 2 ; i<= 999999 … | |
Write a program in any language and use any 5 file operations in that. Also write the output of the program? | |
Hi, Long time lurker, first time poster! Basically here is my assignment, number 3 [url]http://books.google.com/books?id=20xVrpISzoYC&lpg=PA27&ots=llLlOPBIRL&dq=cout%20%3C%3C%20%22this%20is%20Exercise%2016.%22%3C%3C%20endl%3B%20%20%20%20cout%20%3C%3C%20%22In%20C%2B%2B%2C%20the%20multiplication&pg=PA638#v=onepage&q&f=false[/url] and so far here is what I got, and I really am stuck on this, if you can help would be great: [CODE]#include <iostream> #include <string> #include <iomanip> #include <list> using namespace std; struct menuItemType … | |
Hi. I am new to programming and I really have NO CLUE about it. How can you sort 5 variables (namely A,B,C,D,E) without any values assigned to it? | |
Hi I am getting a Runtime error when I debug this code. Could someone lend a helping hand? It will be very much appreciated.[code]#include "stdafx.h" #include<iostream> using namespace std; void main(int argc, char* argv[]) { const int SIZE = 9; int numbers[SIZE]; int counter; int temp_swap=0; counter=0; cout << "This … | |
Hello all, I'm having a problem with my program when I try to compile it. It shows the message in the thread title along with a method it doesn't like: extensionRemover(). I've Googled the problem but they were all related to the header file and use of multiple classes. Where … | |
I didn't mean to offend u. I've fallen behind in my class and in fear of failin. Nice slap back to reality. Hope I can get tips in the future. | |
I need help completing a home work assignment. Creat the logic for a program that continuously prompts the user for a numeric value until the user enters 0. The application passes the value in turn to a method that squares the number and to a method that cubes the number. … | |
I am having trouble getting my program to run. I can't figure out where this error is...prob. something easy and i'm just to tired to find it. Anyways here is the project details and the c++ code that I have wrote is attached below since I haven't messed with the … | |
Hello ladies and gents, Had to make the following exercise in Accelerated C++ Write a program to calculate the average of the numbers stored in a vector<double>. THis was my solution: [code] #include <iostream> #include <iomanip> #include <vector> using std::cin; using std::istream; using std::cout; using std::setprecision; using std::endl; using std::vector; … | |
I am have to create a program for my class. The instructions are to allow a user to input an integer and display the month and day that corresponds to the entered number. For example, user enters 32 and it will display February 1. I must create a DayOfYear class … | |
Hey, i want to display live x and y values on a C++ form in vs2008 and want to control windows mouse pointer through the x and y values my program is generating. Need help. Thanks | |
I've read this on some other questions here at DaniWeb so I've been trying to use the suggestions posted. They don't seem to be working correctly for what I need or I'm seriously confused (probably the latter). Anyways, I'd like to establish good programming practices early to avoid developing bad … | |
Hello! I'm trying to make a simple calculator in Visual C++ and while coding the decimal button, I encountered the error C2228. Basically, I'm checking if the textBox1 (its name!) already contains a '.'; if yes, then it should return; else, it'll add a '.'. To check for that, I … | |
hi all, i was trying to write to a pre existent binary file but every time it would change the size of file and remove all of its contents so what i should i do????? here is an example to what i'am trying to say(it is not exactly the same … |
The End.