General C++ Programming - March 2012 (Page 25)

choose the best structure
 
Hi, I've this situation: /* // type of structure n.b. all proprietes are fixed lenght o...
[no replies]
by hannah
Bullseye
 
Hello! I'm trying to make a bulls function! On average I would like it to hit the Bull 70% of the...
[1 reply] : hope that helps o_O int Bull() { int percent = rand()%100; // r... (by PitDaAnimA)
Deleting duplicate vectors
 
void MovieUser::AddMovie() { string userTitle; cout << "\nTitle: "; cin.ignore(); ge...
[2 replies] Last: so why dont you first look for the title before you add it to your vec... (by PitDaAnimA)
a program to compute a fibonacci sequence from 100 to 1000
 
//program to display fibonacci between 100 and 1000 #include <iostream> using namespace std; int ...
[1 reply] : If you know that you want numbers from 100 to 1000, what is the input ... (by hamsterman)
by Robot7
Silly Question
 
Hello, my question is, if you have a string of numbers, such as 12345, how can you separate the stri...
[2 replies] Last: Here's a algorithm for you . #include <iostream> using namespace std... (by Loving Sky)
by drenyl
hi can someone help me through this nested for loop
 
i need to get this output OUTPUT: ------* -----** ----*** ---**** --***** NOTE: the (...
[14 replies] Last: stupid me :p i usually have also 4 spaces for <tab> but i did it on no... (by PitDaAnimA)
map erase issue
 
Hi, Suppose there is a map (key:integer, value: object) which is not empty as below, I want to know...
[1 reply] : No it's not still available, so your call to s.c_str() results in unde... (by cire)
by kanad
urgent help!! c++ program
 
This function has to read the input file which has names and numbers. The input file's first line ...
[no replies]
Hi... I am doing an assignment for average rainfall and i duno whether my coding is correct or not, i need hlp please... thx
 
#include<iostream.h> void main() { int jan,feb,mar,avg; char option; do { cout<<" Please ...
[5 replies] Last: Your code should start like this (Try to get a good compiler like wxDe... (by jumper007)
by aryu
Please help me solve this...
 
Hi my question is when I run the program it is asking what the score was for a student and after eac...
[2 replies] Last: i would do it like this while(more != 'n'){ //code here cout<<... (by oonej)
Playerbase type not allowed when I try to pass struct array
 
I updated the code accordingly How would I go about making this work I seem to have hit a wall. A...
[3 replies] Last: void q1(playerbase* player) {} EDIT: Also, you'll need to have play... (by Zhuge)
problem with results
 
Hi, i have the code below. I have an array, x, with size 8 and i initialize with ones. I want to ...
[2 replies] Last: i am actually confused with the mpi_gather and i dont really know if i... (by newdomingo)
is it about sorting?
 
Hello, I need your help, Ive got a function and I consider it as a sort function but I am not sure ...
[6 replies] Last: thanks very much so the complexiy is o(n^2) and the final code is sth ... (by newer69)
STL vector class
 
In my project, we are currently loading a list of movies into an array. We have to change the progra...
[3 replies] Last: Yea, the great thing about vectors is that you don't need to use an it... (by IceThatJaw)
by Gldnbr
String to characters
 
I'm currently trying to turn a string into a list of characters. I am using the stringstream method...
[5 replies] Last: Yea, read up on that stuff. C++ strings are very powerful and if you e... (by IceThatJaw)
Im getting fatal errors and i dont know what im doing
 
My Program isnt quite done but im getting a fatal error #include <iostream> #include <string> ...
[no replies]
by roryn1
How to store number of times a variable is accessed.
 
I'm trying to make this program output the number of times an item has been typed in the program but...
[4 replies] Last: update it, or if that doesn't work, use another IDE, <map> is a standa... (by Zephilinox)
Smart Accessor Function for Multiple Data Containers?
 
Hi everyone, I’m Pete, moderately-experienced C++ user who is always looking for better wa...
[1 reply] : You can assign a name to each location and use use std::map<std::stri... (by vlad from moscow)
extension(p) function in Boost Filesystem?
 
Hello I've just finally figured out how to use the boost library fully I can check if a path object ...
[12 replies] Last: Well, looking at your code, you have p = ... on line 1, setting p equa... (by firedraco)
vectors help
 
well im trying to add onto the vector.. But i did get erase to work typedef std::vector<unsign...
[4 replies] Last: EDIT:coder777: yea, it would! There isn't a version of insert that... (by cire)
March 2012 Pages: 1... 2324252627... 49
  Archived months: [feb2012] [apr2012]

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