General C++ Programming - December 2013 (Page 13)

Dynamic structures
 
I have a question.Does anybody know how to find the average value of all the elements in a deque?
[2 replies] Last: Same as for any other container: std::cout << std::accumulate(d.begin... (by Cubbi)
Matrix/Member Function help
 
help comp sci
[no replies]
Randomizing order of if-else statements
 
The purpose of doing this is so that the top of the if statements is not preferred over the bottom. I tried assigning enum values to each case. Then choose a ra...
[18 replies] Last: > I guess the problem is that k is not known at compile time, right? ... (by JLBorges)
printing number of days in a month
 
I write this program to print the number of days for the month when the year and the month enters. This is not giving any result and i think that problem is ...
[8 replies] Last: Don't feel bad. I make plenty of stupid mistakes too. Most recent: htt... (by Duthomhas)
Need help with program
 
Hi there, Are there any guys who can code a program that can detect if people are using a c++ program ingame? I can't do it because I can't code in c++ and I...
[no replies]
Anagram Solver not solving all words
 
I'm working on an anagram solver, and started with words 3 characters big. But it can solve some words and not others. std::string str = "enp"; std::stri...
[4 replies] Last: sort(a) == sort(b) (by ne555)
by Aarix
how can I code this?
 
Hello everyone, A friend has given me this scenerio "Imagine a grid of pixels, all can be one of three colours, say blue, red and green, You start with ever...
[7 replies] Last: @op Well, if you want to see a nieghbor, think about it. A line of X... (by IWishIKnew)
by rudd
simple calculation of char?
 
void viewWasteReport(){ EXEC SQL BEGIN DECLARE SECTION; char wasteid ,wastetype ,month ,wastequantity ,wasteweight ; //double wastequantity ; //double ...
[6 replies] Last: i have never used sql and c++ (but i probably need to for my website).... (by closed account Dy7SLyTq)
Parsing a large file into smaller units
 
I have a large binary file (84GB) that needs to be broken down into smaller file sizes (~1GB to 8GB) for analysis. The binary file is on a 32-bit machine and ca...
[7 replies] Last: > I've not used the standard Windows file functions before so there wi... (by JLBorges)
Average Calculation function not working as expected to
 
Prior to this post: http://www.cplusplus.com/forum/general/120061/ My calculation function will not work like i wanted it to. It gives me 0 or a crazy numbe...
[12 replies] Last: Okay, good to hear. I thought it was related to uninitialized variable... (by Sirolu)
by hdog
A ASSIGNMENT BUT DONT NEED SUBMIT (Multi-objective ranking)
 
THANKS EVERYONE. IM WORKING OUT ABOUT THIS ASSIGNMENT I WISH SOMEONE THAT GIVE ME CODE FOR EXAMPLE AND I JUST LEARN FROM THIS. WHOLE PDF FILE : http://www...
[no replies]
Return maximum frequency number from stack
 
I designed one mfc vc++application in which data received from udp is stored in file as well as in stack.I used stl for stack; it stored elements as per receivi...
[1 reply] : retrieve elements of stack as an array? Well, stack is not array. If ... (by coder777)
by K10ja
Generating Random numbers
 
HERE IS THE PROBLEM : Code a class named “TargetGen” that does the following:  Generates a certain maximum number of random numbers that contains a cer...
[1 reply] : Here's an attempt to generate unique random numbers. It's an example f... (by condor)
bigNumbers fakulty
 
Hello everybody, I have a problem with my Code, I implemented a new Data Typ bigNumbers and trying to calculate faculty with it. Now everything works fine, exc...
[6 replies] Last: i know it would have been easier with an integer parameter, but then i... (by mrniceguy420)
Unkown problem with simple RPG
 
I'm fairly new to C++, in a sense that I know and understand a basic amount of knowledge. My problem, however, is implementing it, as I always seem to do someth...
[5 replies] Last: The condition on line 37 is wrong. while ( monster.health >= 0 && pl... (by cire)
nothing prints!? (1,2)
 
Hi. Why is it that nothing prints with my code? Here is my code: void generate( int *A, int m, int s, int n);//impl. is left out for the //sake of berevity...
[27 replies] Last: nice one. In which case you wouldn't need stupid hacks to `keep the ... (by mutexe)
by UMF01
Should An Array Of Class Objects Be Used On This Trade Stock Project C++
 
Hello, I was wondering if I could get advice on a project me and my friend are working on. Basically it's on a Trade Stock based system that is user interactive...
[1 reply] : We're thinking of using an ARRAY OF CLASS OBJECTS method to solve thi... (by coder777)
Case scope in switch statements
 
Is it's scope confined to that single case? char ch; switch(ch) { case '1': using namespace common::section1; //only this case?? ...
[8 replies] Last: Dam that's ingenious... (by IWishIKnew)
string
 
#include<iostream> #include<conio.h> #include < string.h> #define size 20 using namespace std; void main() { char *str1 = "Dulplication"; while ( s...
[10 replies] Last: The you need to use char& string.operator (unsigned int&) on the str... (by IWishIKnew)
Need a solutaion
 
Hello, All the C , C++ ,C# or any other programmer . I am a new beginner to C++ programming language . I do not know any language . I have some knowledge about...
[1 reply] : What should you know? C++ What extra language? Any really... Java's a ... (by sargon94)
December 2013 Pages: 1... 1112131415... 37
  Archived months: [nov2013] [jan2014]

This is an archived page. To post a new message, go to the current page.