49,761 Topics
| |
This is a stupid question, but for the life of me, I cannot remember how to create the "Or" symbol in code....(the two vertical lines...)...how do I do it? | |
I tried to create an array that would increase its own size depending on the user's action. For example: The user types the name of one contestant, the array contains only one element (the name), later the user enters another contestant, the array becomes an array of 2 elements, each … | |
Hi, I am learning inheritance and abstract base classes. I need to define an abstract base class (ABC) that provides interfaces, and a derived class (directly from the ABC) that provides the implementation. The derived class may need additional member functions and variables (both, public and private). Using a pointer … | |
Hello, I just wanted to say Something about OS I read the one march 2004 topic But if I read a book on C and c++ Will it show me how to do like programs Is there a site that shows me how to make a OS? | |
need help, what I need to do is have the status function run before each withdrawl to let the user know if the account is active or inactive. Active = balance > 25, if account balance <25 then no withdrawls can occur. I have the following: #include <iostream> #include "Savings.h" … | |
#include <iostream> #include <iomanip> using namespace std; //global constants const int SIZE = 12; //function prototypes bool getAverageRainFall(double rain[SIZE]); bool getExactRainFall(double rain[SIZE]); void displayResults(const double actual[SIZE], const double average[SIZE]); void printMonth(int month); // PRECONDITION: month holds an integer 1-12 // POSTCONDITION: the corresponding month (Jan, Feb, ..., Dec) has been … | |
Hello, I need help with re-ordering the values in ascending order in the array Unordered. However, I cannot use sort or swap functions. The values in array Index are used as indexes of array Unordered to put the values into the sequence shown in Ordered. I am writing this code … | |
Hello all, I'm very confused on this K factor stuff.....I understand that...1*2*…*k indicates the product of consecutive numbers and therefore: 1*2*…*5 is actually 1*2*3*4*5 = 120 But I'm not sure how to write that as a code. I have the following information: /* pseudocode for Binomial Coefficients */ int binomial(int … | |
Hi everyone, this is my first post on this site and I was wondering if anyone could help me with this. I'm sorry if my coding style is strange, I'm relatively new at this. The program is supposed to prompt the user to guess a number between 1 and 1000, … | |
Hello people, this is my second attempt to get help for the same code. First post is unsolved. I apologize for any confusion in my posts but I'm confused myself so it's somewhat hard for me to properly explain that which I don't even understand....:$.... I have been given the … | |
Ok....I'm stuck again...I'm wondering if there is a way to sort the following code, so that I can pick out the highest value. I don't believe that I can make it into a list, since they are in parallel arrays. I'm hoping not to have to do a long set … | |
I need to save an object to a file and then reload it later on. I think this is called serialization but I don't know. I have made a simple example below that I need to fix. [CODE]#include <iostream> #include <fstream> #include <windows.h> using namespace std; #define MAXV 1000 class … | |
I am making a modification for Half-Life 2 where the player has the clip sizes and reserve ammunition from the original Half-Life. I know it can be done, but finding it is hard enough. Does anyone know what codes to change to change the magazine sizes and reserves, to make … | |
Hi everyone This code works fine but the asterisks that print to represent the percentage is wrong. The example given was there was a total of 14 grades across the A-F range, but "A" had 1 and 1 should represent 4 stars one the chart. Whats wrong???? [CODE] #include <cstdlib> … | |
i have to write a program database with investors names, ammounts invested, city, and the phone numbers. i have one binary search tree, unsorted where the key is the name and ammount, and a heap sorted by the ammount invested. now i need to display the top 3 cities (with … | |
i believe that it checks every nodes height and makes sure that the left -right is 1 or 0 or -1. It is supposed to return tree if tree is balanced which means that left-right is 0 or 1 or -1 at every node. [CODE] template <class KT, class DT> … | |
Hi, how could you find the last digit in an integer? Thank you. | |
[CODE]#include "queue.h" #include <cstdlib> using namespace std; void queue::sort() { Node *nodeLeft, *nodeRight; double temp=0; int nofswaps=1; if(size>1)//check that at least two nodes exists in the queue { while(nofswaps>=1) { nofswaps=0; do { nodeLeft=pFront;//nodeLeft first time points to the first node of the queue and then points to next node … | |
so I've got a lot of it done, I just need a hint as to the next step. So far I have the user entering a bank account, interest rate, and account balance. I need the user to enter an amount of years and the program will go through that … | |
I'm trying to configure my application so that a user without wxWidgets installed on their computer can compile the code. I'm not sure how to do this although I believe I have to use .DLLs? Has anyone got some info on how I can do this? Thanks in advance. | |
Hi i am doing a program that has to add up the percentage for example if i get one question wrong it adds to the percentage and after i answer 20 questions i would get the final mark but i dont get why it doesnt work. [CODE] void multiplier(int difficulty)// … | |
| Hi all, and must say a great looking forum! I wish to start developing c++ apps on Linux and would like to know what GUIs are supports out of the box on Linux, especailly the main distros anyway? QT, KDE, GTK, etc? I basically want to write gui apps that … |
I have a project that I'm working on in C++ where I have to Search for Multiple Occurrences of a String in a Text File. Does anyone have code out there on how to do this? Thanks | |
So I have a game in c++ console, and it's pretty big now. (over 3 megabytes) I've been using strings in the code forever, but now, I need to make a separate exe program from scratch that will update the game when needed. Big problem - this new program is … | |
Hello all, on an assignment my professor has asked us to "paint" a few different shapes on a canvas. (square, rectangle, circle, ellipse) to keep it simple, I had no problem breezing through the square and rectangle. to help you understand, here's a bit of code from one of the … | |
what's wrong with this code in VC++ 2008 Ex [CODE] #include <conio.h> #include <iostream> using namespace std; class Allocate { private: void* v; unsigned n; __int8 dummy_ret; void* Alloc(unsigned& n) { void* ret; if(n == 0) ret = 0; else { ret = new(nothrow) char[n]; if(ret == 0) n = … | |
Sorry about my primitive questions but I cannot find a good summary about this basic topic. So I would like to write my own libraries: mylib.h and mylib.cpp. I need to include some standard libraries. But I dont want to overload them, what is the solution? I have to use … | |
Why would the following things be advisable? Prefer a plain int over a short int or a long int. Prefer a double over a float or a long double. Prefer plain char over signed char and unsigned char. Why ordering members of a struct by size can minimize wasted space … | |
I am trying to write a program that 1. opens letterFile containing letters on each line 2. reads in first line of letterFile 3. save the pointer position of letterFile in pos 4. opens numFile containing numbers on each line 5. as it goes through numFile, outputs the letter from … | |
I need someone to help me with a programme and the specifications are these: The task is to create a customer order system for an oil company who sells oil products to its customers. The customers are companies using the oil products in their machines or in their manufacturing processes. … |
The End.