Beginners - August 2012 (Page 10)

by maroun
save a map in a vector that contains maps
 
Hey all, I want to save a map in a vector that contains maps : vector<map<string,unsigned int>> code: vector<map<string,unsigned int>> map_vec; vector...
[3 replies] Last: thank u (by maroun)
I've hit a road block. SDL
 
I am a few days into c++ and have hit a road block. I am trying to fill the screen with randomly colored rectangles using SDL. I built the array and assig...
[1 reply] : Never did fall asleep but figured it out!! #include <SDL/SDL.h> #in... (by bythree)
Write a C++ progam to compute a polynomial
 
How do I write a C++ program to compute a polynomial using loops? I'm supposed to solve the polynomial function Pn(X) with x=2 and n=10 Pn(X)=1+x+1/2! x^2+....
[5 replies] Last: @peter if I take out line 3 wont that take out the first part of the e... (by ApacheOmega)
UML for C language project
 
Hi, I have a C project, and it just contains functions that read and writes files, and modifies strings. Would a Use-Case diagram be the best, since I won't ha...
[3 replies] Last: UML is an Object Oriented design method. Just because you're using C,... (by kbw)
by Ch1156
Can i do this in an if statement? (1,2)
 
I need to do see if the user inputs something and i am using an if statement but it gives me one error: if(choice == v.Names() and "+" and v.RNums()) { ...
[39 replies] Last: ok i'll do that. (by Ch1156)
by NWNINA
if/else program. cannot figure out what's wrong
 
I cannot figure out why this program is not running. It says that discount wasnt initialized.
[7 replies] Last: Here, this should work:- #include <iomanip> #include <iostream> usin... (by Dash)
A little help with terminal screen clearing
 
Hello everyone! Any ideas on a code of some sort I could use to clear my terminal screen/console? I've looked about and found the "system ("cls")" command...
[2 replies] Last: odear. There's a whole article for it. Now I feel terribly silly for... (by Ginnjii)
va_list isnt working propertly
 
I have this function: void CommandHandler::HandleAccountCreateCommand() { std::string Username, Password; ExtractArg(Username); ExtractArg(Password...
[3 replies] Last: Of course if you have a type mismatch, you'll have errors in processin... (by kbw)
What is the actual need of "classes"? How classes are beneficials?
 
I am a new C++ programmer. I have made few simple programs on classes? i am unable to understand the utility and need of classes
[2 replies] Last: Do you understand the need for variables? Like int, double, float, cha... (by Moschops)
inheritance testing project
 
Hi there. I am trying to learn classes and inheritance, but I am missing something here. I've created two classes and have to prove inheritance between the pa...
[3 replies] Last: Thank you both, very much. That makes a lot of sense, especially seei... (by newbe25)
size of a text file
 
hi need to find a way of reading how many 32-bit numbers are in a text file i am opening the file and the putting the content into an array . e.g. ther...
[3 replies] Last: Yeah, you need to manually test how much was read. C++ iostreams are ... (by bradw)
by lukeb
passing a multiple vector
 
Hi, I have a class that generate a 2D vector of String vector<vector<string> > matrix; In the same class I have get and set method for that field: ...
[5 replies] Last: I've solved! It was my mistake: I had declared two time the same vari... (by lukeb)
by Naureg
Recommend me an image editing library
 
I'd imagine there's a bunch of them around, but considering I've never used one I'd like to use one with these properties: Easy to begin with Good resources...
[1 reply] : You want easy and fast; those are generally conflicting considerations... (by Moschops)
Largest no of given 3.
 
I'm trying to take the largest no of given 3 nos.Currently I can successfully take it from 2 nos.How change the if condition for 3 nos. #include <iostream> ...
[2 replies] Last: Because of the transitivity property max(x,y,z) = max(x, max(y,z)) ... (by ne555)
array
 
does arr ={0}; means each element of the array "arr" has been initialised to 0??
[4 replies] Last: @vgoel38 When you first create the array, as in int arr = {0}; ,... (by whitenite1)
finding 100!
 
there is some compilation error in it..not able to find.. http://ideone.com/Pvped plzz..hv a look
[12 replies] Last: Correct. Curly braces allow you to set multiple values at once, which... (by closed account o3hC5Di1)
Random nubers
 
#include <cstdlib> #include <time.h> #include <iostream> using namespace std; int main() { //initialize random seed srand(time(NULL)); unsigned columns,...
[11 replies] Last: unsigned array[rows*columns]; //fill the "matrix" 1 to rows*columns ... (by ne555)
by Aceix
Unions
 
Why were unions created? what are their uses!?!
[5 replies] Last: Because C++'s conversion operators do not allow conversion to a void ... (by ne555)
by samrux
Looping sound with mciSendString
 
How to do it? I want it to loop it forever. Just that. Loops and loops. But to still play it in the background, obviously!
[3 replies] Last: repeat should be after the media name. I do prefer to open with an al... (by andywestken)
by maroun
load text files from directory
 
hey I want to enter a folder and load all text files in that folder one by one, I wrote this func and it's wrong !! string line; DIR *dir; struct d...
[4 replies] Last: Thank u Peter !! (by maroun)
August 2012 Pages: 1... 89101112... 45
  Archived months: [jul2012] [sep2012]

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