49,761 Topics

Member Avatar for
Member Avatar for PDB1982

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?

Member Avatar for PDB1982
0
50
Member Avatar for Kuroshi

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 …

Member Avatar for Kuroshi
0
172
Member Avatar for C++NOOOB

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 …

Member Avatar for Ancient Dragon
0
128
Member Avatar for Tauren

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?

Member Avatar for Ancient Dragon
0
533
Member Avatar for Gem74

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" …

Member Avatar for Gem74
0
81
Member Avatar for moods125

#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 …

Member Avatar for moods125
0
199
Member Avatar for americanfire

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 …

Member Avatar for americanfire
0
142
Member Avatar for confusedndazed

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 …

Member Avatar for confusedndazed
0
150
Member Avatar for MegadanX5

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, …

Member Avatar for MegadanX5
0
158
Member Avatar for confusedndazed

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 …

Member Avatar for lotrsimp12345
0
116
Member Avatar for PDB1982

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 …

Member Avatar for PDB1982
0
130
Member Avatar for gsingh2011

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 …

Member Avatar for Ancient Dragon
0
113
Member Avatar for DanielL5583

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 …

0
41
Member Avatar for fatboyandy

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> …

Member Avatar for Murtan
0
113
Member Avatar for nightninja12

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 …

Member Avatar for lotrsimp12345
0
100
Member Avatar for lotrsimp12345

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> …

Member Avatar for lotrsimp12345
0
63
Member Avatar for micke
Member Avatar for donaldw
0
268
Member Avatar for miag

[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 …

Member Avatar for gastonci
-4
91
Member Avatar for simplyscottif

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 …

Member Avatar for Murtan
0
224
Member Avatar for pac-man

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.

0
46
Member Avatar for Mclovin1234

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)// …

Member Avatar for JasonHippy
0
99
Member Avatar for stevee1984

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 …

Member Avatar for stevee1984
0
121
Member Avatar for lonprog

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

Member Avatar for mrnutty
0
116
Member Avatar for mybluehair

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 …

Member Avatar for Nick Evan
0
94
Member Avatar for arsenal23114

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 …

Member Avatar for mrnutty
1
90
Member Avatar for CppBuilder2006

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 = …

Member Avatar for CppBuilder2006
0
81
Member Avatar for merse

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 …

Member Avatar for Narue
0
146
Member Avatar for punchinello

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 …

Member Avatar for Narue
0
80
Member Avatar for rsaska

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 …

0
68
Member Avatar for lmkamvazina

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. …

0
48

The End.