General C++ Programming - February 2013 (Page 9)

Combinations - help with sorting duplicates
 
Im trying to generate a set of four numbers, each ranging from 1 to 200 for starters, but upper limit could be higher. what i have now is 4 for loops: v...
[2 replies] Last: No that doesnt work. The number of results was incorrect. I sadly drea... (by closed account EUC9216C)
A little help here please
 
what is the general syntax for declaring two-way friendship in 2 classes
[1 reply] : class A { friend class B; }; class B { friend class A; }; ... (by Peter87)
100 Fibonacci numbers
 
Is it even possible to store the 100th Fibonacci number (beginning with the numbers 1 and 1) into a variable? I know the number is pretty huge, and wondered if ...
[6 replies] Last: Taking logarithm of the 100th fibonacci number (354224848179261915075)... (by eklavya sharma 2)
sorting algorithm returning indeces
 
Hello, I have some double values. For sorting them I could simply use std::sort(.). However, I actually don't need the sortet values but the indeces. E.g...
[3 replies] Last: > I am sure Im not the first one with this problem. No, you are not.... (by JLBorges)
explaining output of given program
 
Following program is given.pl tell me what will be output of this program and also explain how to get it #include<iostream.h> void main ( ) { int Track [ ...
[4 replies] Last: The following statement in your program is going to cause a problem: ... (by AbstractionAnon)
by oluwa
unlock a gsm phone locked to straight talk network
 
I know this is out of topic but I just need your help. Can you help me unlock a gsm phone locked to straight talk network? It seems no one can do it I have ...
[1 reply] : I guess this is not the best forum to ask this question... I even doub... (by Niels Meijer)
Help. Sorting trouble
 
Hi, Help me with this. All I wanted to do is to sort the car names according to their mileage. And display the output with their car names. This is what I've ...
[4 replies] Last: main() { int i,j; car a ; //a .sorting() //{ //} for(i=0;i<5;i+... (by sam806)
by mayzuh
Help program skipping
 
MY program is skipping on the line that asks for the name is i put the full name with a space it will skip the rest and output everything without my input. cod...
[2 replies] Last: @ justaguy: Absolutely not. @ mayzuh: It's just a common RTFM case. Y... (by toum)
ctors and consts
 
Hi - I'm trying to build a ctor for a class. The ctor will invoke the ctor of a child class 10 times, establishing a different constant within each. If this ...
[17 replies] Last: Using emplace_back() is also an option if your compiler supports it.... (by cire)
string initialisation
 
Hey this is my class class boys { string 2bac ; string 4bac ; string 6bac ; string 2bnac ; string 4bnac ; st...
[6 replies] Last: Okkk thanks a lot dude!! u cleared my doubt!! (by gaurya95)
HashTable Insertion not working
 
Hey
[2 replies] Last: @cire Thank you so much for the help! Thank worked just fine. I think ... (by matheuskiser)
helpme!! friend function
 
Guys I am doing my assignment in which I am supposed to use friend function... One of the parameters for the friend function has to be a class name... so is ...
[3 replies] Last: Ok thank you guys!!! (by gaurya95)
Variable Trouble
 
Well, I've got a variable that I want to store in part of a variable. I tried to use the iostream <<#<< way, but it hasn't worked. This is my current progress ...
[6 replies] Last: I don't know, maybe it's because I used Allegro 4.1, and not 5, but th... (by racefreak)
deleting a pair for reuse
 
i'm using a pair variable to store some data and every time in the loop i need to delete the contents of the pair for reuse. the type of pair is: pair <string...
[4 replies] Last: ok it worked. i thought it the other way. (by neutron star)
runge-kutta 4 problem
 
I am trying to get a runge-kutta program to work, but I keep getting the following error message: error: cannot convert `double' to `double (*) ' for argument `...
[13 replies] Last: There, now try it that way and it should work. =D (by crimsonzero2)
SDL_pong
 
The rand() pard doesn't work properly, the ball often just bounces infinitely up and down in the middle and sometimes it gets stuck not moving (in the middle). ...
[2 replies] Last: Thank you =) Do I have to check yVel to? EDIT: Was this a decent sol... (by closed account ETAkoG1T)
program to find shortest path
 
given matrix A find shortest path between vertices using matrix power multiplications untill u get nonzero values,use adjacency matrix
[1 reply] : http://en.wikipedia.org/wiki/Dijkstra's_algorithm (by Smac89)
Generating big random numbers in C
 
I am not sure if I am writing into the correct section of this forum. I want to generate big random numbers in C(not C++ please).By "big" I mean integers muc...
[2 replies] Last: Thanks for your answer.(sorry for late reply) how big of a random ... (by Awareness)
sorting method
 
Hello, first off I would just like to ensure that this is not for homework or anything like that because I am past the first class of cs111 where by now we shou...
[7 replies] Last: You will have to explain the logic you are trying to apply to that sor... (by Smac89)
Creating classes
 
Program Objective: Create class named quark which will store the name (up, down, charm, strange, top or bottom), charge (+2/3, -1/3, +2/3, -1/3, +2/3, -1/3 e) ...
[1 reply] : A few things: 1) const on a function tells the compiler the funct... (by AbstractionAnon)
February 2013 Pages: 1... 7891011... 43
  Archived months: [jan2013] [mar2013]

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