Beginners - February 2011 (Page 6)

Bolt Circle Calculator
 
Hi everyone, I am a first time user of these forums and joined in the hopes of getting some help with what is supposedly an easy problem which my ineptitude wil...
[3 replies] Last: http://www.cplusplus.com/doc/tutorial/operators/ The comma operator e... (by ne555)
by raffos
boost.cgi first compile error
 
I have just installed boost and boost.cgi (fastcgi from http://cgi.sourceforge.net/). Boost compile without errors using a "header-only library" and "Boost Libr...
[6 replies] Last: I found this in ReadMe file: Currently tested on Ubuntu 8.04 ... (by raffos)
by starry
generate vectors with even numbers
 
I need to write a function that creates and returns an int vector with even numbers, starting with 2. Here is what I have so far: #include <vector> #incl...
[2 replies] Last: Do you need to determine even numbers in a given range or generate a s... (by moorecm)
by jfiore
My output is wrong
 
Hi. I wrote some code to analyze the outcome using a roulette strategy and put it into a file (which I will then use to make a graph). It goes through a loop u...
[12 replies] Last: Ok, I changed the loop variables, and the output is different, but it ... (by jfiore)
query in virtual inheritance
 
i have came across some snippets of code class ClassSealer { private: friend class Sealed; ClassSealer() {} }; class Sealed : private virtual Cl...
[7 replies] Last: sorry jsmith for delay. i want to know how Virtual keyword makes t... (by chnnaveen)
Input
 
Hi, i'm trying to write a program, which may do some actions, while taking a character. E.g. Like this char-box, while i'm writting this message, the box bello...
[5 replies] Last: up, plz (by TJbla2e)
Go to question
 
Can somebody explain to me why the Go to command is bad? I am a newbie at c++, and the only thing i have been told about go to is that it encourages you to crea...
[1 reply] : Did you try Google? Or maybe asking Jeeves? Or perhaps searching thi... (by moorecm)
classes
 
can someone give me a fairly basic rundown of classes. like what they are for and how to use them.
[14 replies] Last: thanx alot yall have really helped me out cuz for the program i am mak... (by cainen172)
Function does not return correct value. (1,2)
 
#include <iostream> using namespace std; int arraycontains (int ArrayBeingChecked , int NumberBeingChecked){ int i; int sizeofarray = sizeof(ArrayBeing...
[35 replies] Last: Ah, I kind of forgot that once you return, you leave the loop. (by CCNezin)
Question about rand()
 
Hello every1 this is my first post in these forums, and i would like to say hello to the c++ community. Now in order to cut to the chase, i would like to ask sp...
[1 reply] : rand() generates pseudo random numbers in the range [0,RAND_MAX] To... (by Bazzy)
by Nuc
If equal don't do anything (1,2)
 
Okay, so I were updating my mini-rpg console app. thingy and I wanted the console to write "Draw!" if both heroes lose (their health below 0) So how do it? S...
[26 replies] Last: So there is no other way than making it a loop? There's nothing faster... (by Nuc)
"assert" function
 
Consider the following function access_element_by_index that returns the iterator to the element at the index i in the list l. typedef std::list<int> int_...
[1 reply] : Are you giving us orders? http://www.cplusplus.com/forum/beginner/1/ (by filipe)
by kesler
Menu system for console app, need assistance
 
Hello. I am attempting to develop a win32 console menu system using VC++ 2010 under some specific parameters: It gives the user an option to choose 1 throug...
[3 replies] Last: It can't use 0 for exit, and it can't use int since ints can't accept ... (by kesler)
Learning C++
 
Hello, Is there anyone who is willing to teach me C++. All I want is someone who can have work assigned to be finished on a certain day so that I stay on tra...
[2 replies] Last: Also check out the tutorial: http://cplusplus.com/doc/tutorial/ (by moorecm)
file i/o
 
I'm working on a profiles type of system and this is my latest build. It works and everything but when i cout the data from the profile its all these weird char...
[2 replies] Last: Oh I see. I'm not very familiar ti ASCII, I'll try find a different ap... (by shadowvillian)
Serialisation
 
Hello everybody, I'd like to ask you if anyone use or participate on a project to serialize any object without use boost or any library. Just for information...
[3 replies] Last: You can send it to me via PM if you'd like, though I can't promise any... (by jsmith)
Making the user input this
 
#include <iostream> using namespace std; struct Student{ char Firstname ; char Lastname ; int grades ; double average; int i, k, n; void cal...
[5 replies] Last: There is an example in the last link I gave you. (by m4ster r0shi)
input, read and output
 
I want to read one number from the console and then read in an arbitrary list of numbers from a txt file and then print how many times the console number occurs...
[1 reply] : You can fetch a value from the keyboard like this: int x; std::... (by Moschops)
by pooshi
Composition in Classes
 
Hello. I have a card and deck classes going and I am having some trouble. My deck class encapsulates all of my card objects and when a deck object is created ...
[1 reply] : deck does not have a constructor with two int arguments declared. dec... (by hamsterman)
by ardav
Loading a certain line in a text file as string
 
#include <iostream> 1)I have a txt file containing file names in every line (about 120) (1ay.tif 1by.tif 1cy.tif ... ) 2) I will use a for loop to loa...
[1 reply] : while( getline(myfile, line) ) cout << line << endl; I want to b... (by hamsterman)
February 2011 Pages: 1... 45678... 43
  Archived months: [jan2011] [mar2011]

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