Beginners - December 2009 (Page 10)

class with array
 
i need to declare string deck in a class and give it values in the implementation section. values are cards so... {"2D","3D",...} thanks for the help
[4 replies] Last: Seeing that the deck will always be the same, it could be made a stati... (by moorecm)
list of map iterator
 
map<int,int> coincidence; list<map<int,int>> coincidences; list<map<int,int>>::iterator list_it; map<int,int>::iterator map_it; coincidence = 1; coin...
[5 replies] Last: For portability, or more specifically compiler-independence, it is bes... (by moorecm)
by epszxz
cin with 40 characters how to
 
I need to be able to read a line that's not bigger than 40 characters including the blank spaces. how to do it? It's for names
[1 reply] : http://www.cplusplus.com/reference/iostream/istream/getline/ http://w... (by Bazzy)
Lost!!!!!
 
I have been trying to write this program and i have no idea what i am doing. I don't understand alot of the C++ language. I just know the basic stuff. So if...
[17 replies] Last: Thank everyone, I got it to work and the out put is coming out right!! (by micheala789)
calling for random function inside class?
 
I have a class with public functions but I want to be able to call one of the four functions, randomly. How could I approach this?
[1 reply] : You can make a function like this: void call_rand_func () { ... (by Bazzy)
Customising VisualC++
 
I know this topic would best be posted on the VC++ forums but navigating and logging in successfully proved to be a challenge. I have never used vc before, ...
[1 reply] : stdafx.h is a precompiled header, nothing you really need. Somewhere i... (by Bazzy)
by patman
How can i read column by column from a txt?
 
Hello ,i have a numeric txt file like the following one: 2 3 4 5 6 7 8 9 0. The problem is that i want to read each column and store it in an integer array ...
[1 reply] : You can read a file only sequentially unless you know the exact positi... (by Bazzy)
Array program troubles. Need assistance.
 
I have to create a program for one of my classes. It is extra credit. I am stump as of right now. What is the best way to accomplish this using arrays and st...
[10 replies] Last: @ jdawg123 You are not using any array there, read the tutorial fro... (by Bazzy)
Quick accessor question...
 
I'm currently learning C# from a book and have a couple of questions that someone could maybe clear up for me: 1) Am I right in thinking that C# is the next ...
[4 replies] Last: Thanks for the clarification GW. Much appreciated. Thanks again for... (by Johnny T)
by syix
fatal error c1010
 
Hey, I realize there's already a post to this question and a reply but I've pretty much tried all the suggestions found online to no avail. My current pro...
[2 replies] Last: If it can't find the pre-compiled header directive, then solution 1 is... (by closed account z05DSL3A)
Re write this code without functions?
 
Can someone help me? #include <iostream> using namespace std; void fill_array ( int golfArray , int size); double compute_average ( int golfArray , int...
[8 replies] Last: at the top the double compute_average ( int golfArray , int size); ... (by Mythios)
by btripp
How to know when the user is done entering numbers in the istream???
 
Ok. In my linked list class I am making an istream operator so a user can just cin >> aList; Here is what I have so far istream& operator >> (istream& is, ...
[2 replies] Last: You my friend are amazing. and are an ispiration to all of us. (by btripp)
static data members inside constant function ?
 
Hey Guys, I was reading about bitwise constness. It says that, inside a constant member function we can only modify static members. I was just wondering as ...
[2 replies] Last: Aha. Makes perfect sense. Thanks Disch. (by kevinchkin)
Clearification on array
 
Does this successfully assign the random values to the array? #include <iostream> #include <cstdlib> // for rand and srand functions #include <c...
[2 replies] Last: to assign something to the elements off the array, you use the assignm... (by gcampton)
using break keyword
 
is it true you can use break to end a loop? if so would putting a nested switch statement in a loop then using a break intended to break the switch also break t...
[4 replies] Last: something you can copy and paste and run: only reason I made this sam... (by gcampton)
passing array element to function
 
I am trying to pass a pointer to an array element to a function and have the function change the value, but I'm getting a memory overwrite error when the progra...
[3 replies] Last: great!!! Yea after I posted I remeber my teacher saying you could do +... (by btripp)
gauss algorithm
 
I try to make a software that requires gauss algorithm. Can anyone help me with the code for this?
[3 replies] Last: He wants to solve a system of linear equations (per post in General fo... (by jsmith)
comination
 
I am trying to write a code that would calculate the combinations between 18 and 30 numbers until it gives me the result that ai want. 0.18X + 0.12y +0.5 w=8 ...
[1 reply] : Your question is rather a math question. If the equations look like t... (by lloydchristmas759)
Call a user function inside of a user function?
 
Hi, I did some searching on the forums, but was unable to find an answer. Is there a way to call a user defined function inside of a user defined funtion?...
[2 replies] Last: Thank you! I wasn't sure. (by monkeychic)
getline getting a line without user input
 
Hello everyone! I have written a loop for text input like this: for (int i = 0; i < n; i++) //n is assigned to a value by the user earlier in the program...
[7 replies] Last: Thanks for the replies, this was really helpful! (by MFserver)
December 2009 Pages: 1... 89101112... 23
  Archived months: [nov2009] [jan2010]

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