Beginners - December 2010 (Page 31)

Class List
 
please help me finish the function List::OrderInsert(T item) to insert data into list sequentially // List.h #pragma once template <class T> clas...
[2 replies] Last: thank "hamsterman" are you a professional programmer ? i see you can... (by tuandt5)
algorithm problem
 
I made a program that searches through a vector of strings and it tells me if it found it or not. the problem is if i try to search for one thats two words i...
[4 replies] Last: oh yeah i forgot about getline. i guess its been awhile. yeah i could ... (by shadowvillian)
how to get a variable from void inside a class
 
header calss test { public: void load() { int var=5; } }; main.cpp #include "header.h" test get; get.load() now i want to ...
[2 replies] Last: int load() const {return 5;} (by Athar)
by Taboo
Guessing Game Program
 
Write a program called that contains a secret number and gives the user three chances to guess that number. For each incorrect guess, your program must tell the...
[9 replies] Last: No the second code I posted worked, but thanks anyway, I'll post more ... (by Taboo)
how do you create a "system chat"
 
Here is the problem.I'm writing a texas hold'em prog in c++.so far it has no problems.However,I need to know how to make a program output all the information ab...
[2 replies] Last: Ok, thanks for the idea. (by genesys)
by mwmnj
Difficult calculation problem.
 
I am trying to calculate the amount of time it will take to repay a loan given an initial loan amount, annual interest rate, and desired monthly payment. The an...
[3 replies] Last: On top of that i don't see a main function. (by genesys)
Templates Functions and Exceptions
 
I get an assertion error. What is wrong? functions.h template <class T> T myswap(T&a, T&b) { T c=a; a=b; b=c; } template <...
[6 replies] Last: I still get an assertion error. Mine looks exactly like tmoney91's. Ha... (by hydride)
by Timbo1
If Statements
 
Hi there, I am writing a program and I need input from it. But I only want to receive input if it is either 'y' or 'n'. I tried writing an if statement that c...
[9 replies] Last: oh ok, thx for the clarification. Those damn parentheses always throw ... (by ERanz21)
by Faff
Visual C++ Form: Datagridview
 
Hello :) Started today with VC++ form apps, but got stuck with the datagridview Got no idea how to make it show something, and whatever I do , I don't get i...
[no replies]
by NSH
function error "cannot use as a function"
 
So i've been writing this code (I'm a bit of a newbie at this so bear with me) that is supposed to calculate what's called a scattering amplitude. I want to sto...
[4 replies] Last: You can't write ((h*h)(u*u+q*q)) like you can in math. Multiplication ... (by Browni3141)
by sabry
how to write this program?
 
hello i have a q two players play a game of tossing dies and the sum of the two appeared numbers will determine the winner . the sum of the two numbers w...
[4 replies] Last: i agree with them, for dice games it is better to have a random genera... (by ERanz21)
while statement
 
Write a C++ program that uses a while statement to determine the gross pay for each of several employees. The company pays “straight time” for the first 40 ...
[3 replies] Last: have you tried it yourself? if so, then put your code in here, then pe... (by ERanz21)
by firix
smartPointer ?
 
Hi, I read quite a lot of topics about them, but I can not run The following code. Thanks for reading! template<class T> class smartPTR{ T *mp; ...
[9 replies] Last: thanks Disch. (by firix)
Sudoku Game
 
I'm currently in the process of coding a Sudoku Game. When running the program, it reads in a file (that I named 'myGame.txt' that looks like this: 7 2 3 0 ...
[3 replies] Last: i am still a beginner at all of this, but I've done sudoku's a fair am... (by ERanz21)
Leap year whats missing on my program???
 
int main() {int year; ofstream output ("e:result14.dat"); cout <<" Enter Year : "<<endl; output<<" Enter Year : "<<endl; cin>>year; if(year%4==0&&year%...
[11 replies] Last: oh i see, that makes sense now, i kind of quickly glanced at it, but s... (by ERanz21)
by mozly
SDL whats wrong with display format?
 
Im following lazy foo's SDL tutorial to set the color key on an image. I did many of his tutorials and now I have a problem that didn't exist before. I load...
[7 replies] Last: Good Lord, this was a nightmare to debug... I believe i've found your ... (by Return 0)
by GulHK
sub string comparison
 
Hello everyone. I am reading strings from file and I have to identify strings that are similar to eachother but on the basis of a substring i-e if a substrin...
[8 replies] Last: Sorry? (by coder777)
Where to start to learn C++ language? (1,2)
 
Hello, everyone. I got myself finally ahold of Enterprise edition from a friend who is currently studying in technical high school. ( I'm not exactly sure what ...
[29 replies] Last: [quote=fabman]... is "Programming Principles and Practices using C++" ... (by closed account z05DSL3A)
by Timbo1
Cannot enter string
 
Hi there, I am working on a program that updates a file based on user preferences. All my code successfully compiles and I can enter two of the options but th...
[9 replies] Last: Thank you very much, All is well and I can now progress. Thank y... (by Timbo1)
Wierd Behaviour
 
int main() { const int i = 42; *(int*)&i = 43; // What is happening here printf ("i %d,%d,%d",i,*(&i),*(int*)&i); // Why the result is 42 42 and ...
[3 replies] Last: the problem is that you're removing const. If you're writing this 'i' ... (by coder777)
December 2010 Pages: 1... 2930313233... 35
  Archived months: [nov2010] [jan2011]

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