General C++ Programming - October 2011 (Page 24)

array int and digit sorting
 
help me with this problem please. i cannot sort the character inside my array. Input First line of input contains the number of teams T in the competition ...
[1 reply] : use this code #include <iostream> #include <fstream> #include <ioma... (by BHUPENDER KUMAR)
Telling program not to output value when...
 
Hi, I am writing a program to output a dollar value in 20's bills, 10's bills, 5's bills, and singles. So if I had something like $54, it would display 2 x 2...
[1 reply] : #include <iostream> #include <fstream> #include <cmath> using namespac... (by DavidStern)
What's the point of this variable?
 
So my book has this example program meant to show how to use stacks and queues. It uses a stack to determine if a group of characters in a queue is parenthetic...
[1 reply] : Nope. There really is no point to 'test'. (by helios)
How to make this produce secure numbers?
 
Hi, On the MT19337 site it says to make this secure one has to generate a one-way hash so the internal state cannot be read! The code is below....is it possible...
[6 replies] Last: i see you have provided a help in your reply but im still looking :) i... (by amberleef)
OpenGL Books
 
Hi everyone :D I was wondering if there are any good books you would reccommend about OpenGL. I am a beginner and would like to learn about it. Thanks, ...
[1 reply] : See here: http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=s... (by closed account zb0S216C)
Program to write out factors
 
I've been writing a program to get a number and publish factors: #include "stdafx.h" #include <iostream> using namespace std; int main() { co...
[3 replies] Last: You still should include cstdlib. (by Disch)
how to print a triangle in this format
 
Hi All, I am trying to print the triangle of numbers in the following format, Please suggest how to print : format 1: 1 12 123 1234 ...
[5 replies] Last: #include<stdio.h> int main() { int num,i,j; scanf("%d",&num); for(... (by santanubarua)
by zenith
How to Balance a Binary Search Tree?
 
Anybody have a code on balancing a binary search tree? Thanks for any help.
[8 replies] Last: See "http://en.wikipedia.org/wiki/Balanced_tree" and references there.... (by Ralph83)
Map inside Map
 
Hi, I have created map inside following way. Ex: map<key,value> first; and I have to created second map into following way as per my requirement. ...
[4 replies] Last: hmm I was not aware of std::pair. But I did one work around for fix t... (by agoswami)
Display some numbers
 
I want to write a program that displays all the integers from 1 to 100 that are divisible by 6 or 7, but not both and I want to display 5 numbers per row. The o...
[1 reply] : Use the modulo operator. http://www.cplusplus.com/doc/tutorial/operat... (by Moschops)
by xNutty
Help
 
/usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf make : Entering directory `/cygdrive/c/Users/Asus/Documents/NetBeansProjects/204Assignm...
[9 replies] Last: omg.. thanks for your help.... (by xNutty)
linker warning
 
Hello all. At me a problem. I have not corrected warning(4006). Whether I can, separately ignore this warning without ignoring all class of the warnings- 4006. ...
[4 replies] Last: thank you for your opinion, but I fixed this warning and came to the c... (by Mikhail P)
Computers, Commands, and Delays
 
Hello everyone, I was wondering if anyone could possibly help me on this subject: Part of an .exe file in command prompt is to wait (e.g. Sleep(1500); ) b...
[4 replies] Last: Thank you very much for all your replies :D (by Muhasaresa)
Program to add to 2000 in increments of 5
 
I need to figure out how to write a program that prints the answer to 5+10+15+...2000 #include <iostream> using namespace std; int main() { int num...
[2 replies] Last: @musicislife2398 Since you already know the values you're adding up,... (by whitenite1)
how to write the coding for cosine rule in c++?
 
Ask the user to insert the length of two sides (b and c) of a triangle and the angle between them in degree (α), compute and print the length of the third side...
[7 replies] Last: thx you all.. (by B031110034)
Searching in a Stack
 
I have a program where i store colored gumballs into a stack. We buy then store if we have space. Now I am asked to eat that color gumball if it is found but I ...
[4 replies] Last: How do you write something like that, popping all of the items until y... (by onetwothreeme)
Sorted Linked List
 
I am trying to make a program to add, delete, and print a sorted linked list. I have tried many different things and now I am getting a Segmentation Fault so I ...
[1 reply] : //SortedType.cxx #include "SortedLinkedList.h" SortedType::SortedTy... (by Shane McFarland)
deque vs. vector ;)
 
hello example #include <iostream> #include <vector> #include <deque> int main(int, char **) { std::vector<int> v; v.push_back(0); std::cerr << &(v) <...
[14 replies] Last: ¿What do you want to do? (by ne555)
help with const char * and class member functions!
 
Hello, I am trying to count the number of times that "Ni" occurs in the string "Ni nI NI nI Ni". However, I can't get my code to work. Any help that I could g...
[2 replies] Last: Oh my god, how could I have missed that?! Thank you! (by davidrgarber)
by Ali89
How to declare a map which value type is an object ?
 
I want to have a map which consists of a key of type string and a value of type CoefElt. The declaration of the CoefElt is as follows : // class CoefElt clas...
[4 replies] Last: You already have default constructor This is CoefElt (); (you have t... (by mik2718)
October 2011 Pages: 1... 2223242526... 36
  Archived months: [sep2011] [nov2011]

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