Beginners - February 2010 (Page 22)

by ajwest
game trouble.
 
Write a two person chip game. The game will start with a pile of chips. Each player will have the chance to pick up as few as 1 chip and at most half of the p...
[7 replies] Last: thanks for the help i have inizlized maxchips. and the program can run... (by ajwest)
graph dependencies
 
Hi, I have this piece of code that I would like to take eliminate dependencies. Can someone point me in the right direction ? for (i=0; i < m; i++) { n1...
[1 reply] : - lack of code tags: check - undescriptive 1-letter variable names... (by Disch)
read data from notepad without fstream
 
Hi guys. Anyone know how to read data from notepad or other .txt files without using the #include <fstream> header?? I'm supposed to read a data from a ...
[4 replies] Last: thanks for that, Abramus. but the problem is that method haven't been... (by nosxlimit)
by kgru
operator overloading
 
Hi, Everybody Describe the class to work the following code: A a1(2); A a2 = 3; a1 += a2; Excuse my English language. Thanks
[8 replies] Last: iharrold I agree with you. thank you! How do you assign a member... (by kgru)
Creating randomness -Please give ideas
 
Hello, I am studying C++ from a book and now I have to do some exercises-this one is to make a game that plays rock,paper scissors.Due to the fact that i am s...
[19 replies] Last: In general I agree, although unfortunately sometimes "C++ way" is wors... (by Abramus)
classes and inheritence
 
Im stuck with using a class from a library in a selfmade class. I think i understood the fundemantals of using classes and inheritance but somehow im trying for...
[2 replies] Last: On line 131 you are not passing by reference when invoking the functio... (by kevinkjt2000)
by Lhaky
stacks c++ code
 
hello!! can you plzz give an example code, just a simple code for stacks ..
[5 replies] Last: just a simple code for stacks void push(int y) { if(top... (by Maimaje Bello Abdullahi)
Virtual Destructor
 
If I make MyClass's destructor virtual, will it have any impact on anything if my program doesn't use the destructor through polymorphism (in other words, no cl...
[11 replies] Last: I agree with everything the webpage says (that site is pretty good), e... (by jsmith)
too many characters in constant?
 
#include "stdafx.h" #include <string> #include <iostream> using namespace std; int main() { int gas; int batt; bool on; car cars; int i; s...
[1 reply] : Use the " character rather than the single tick ' character. The si... (by iharrold)
make effcientcy code?
 
This is my code #include <iostream> #include <cctype> #include <cstdlib> #include <conio.h> using namespace std; void bin (int , int , int, int, int)...
[1 reply] : You are using mathematical approach, which makes sense when you conver... (by hamsterman)
series of linked lists
 
How do you make a series of linked list without having to create them one by one. If I wanted to make a certain number of linked lists containing each a number ...
[no replies]
loop/getline runtime error
 
hi im trying to get this loop working. the user inputs what they would like to do and then an if statement compares the variable. but when i run it, it print th...
[4 replies] Last: try this after line 40: while (cin.get() != '\n') continue; ... (by dionisis)
sorting algorithims
 
Hi, A really good sorting demo. http://maven.smith.edu/~thiebaut/java/sort/demo.html thanks, **This is not to say I'm in an ivy league school. If that...
[no replies]
threads of an Object?
 
i want to make an Object Test to control many threads. Test.cpp class Test{ public: Test(); void exampleThread(void*); }; Test::Test(){ _be...
[1 reply] : The thread main function cannot be a member function with a "this" poi... (by jsmith)
question about class member
 
hi everyone i've got a question about the variable declaration in the class why i cannot declare a variable of type string member inside the class definition?...
[15 replies] Last: actually i am going to solve my assignment using object-oriented progr... (by loveless)
by miteh
advice on how to do
 
In-source staffs will be paid by hours and are only allowed to work up to 20 hours per week. Production staff will be paid a basic pay range from $800 to $1,99...
[1 reply] : hmm... post your initial algorithm or code first so that we could make... (by olredixsis)
Light dependent resistor and LASER base light switching system.
 
hi! i want to make a LIGHT DEPENDENT RESISTOR and LASER based light switching system. in which i need ur help. basically it is a hardware interfacing programing...
[8 replies] Last: bool off=0, on=1; there you go, and throw in a count++; for good me... (by gcampton)
New to c++ displaying file contents to console (1,2)
 
Hello, I am new to c++ and need some help understanding how a bit of code works. I was given a segment of code: char ch = 0; while( infile.get( ch ) ) {...
[35 replies] Last: Use Proper Indentation. Use Functions. Your code should look som... (by Duthomhas)
C++ string literials
 
Hi I've just recently begun working on a similar assignment to the one everyones having problems with. I've read through this forum and have been trying to piec...
[1 reply] : is Line 17 printing output ?, or is the switch not working? if line ... (by gcampton)
How would I call this function?
 
I have a header file and a main file. I want to call the "HP" value that is inside my header file, but how would I do this? Here is the code: //HEADERFILE...
[1 reply] : You can't call a member function unless you have an object. For ins... (by Disch)
February 2010 Pages: 1... 2021222324... 32
  Archived months: [jan2010] [mar2010]

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