Beginners - November 2010 (Page 29)

by chonJi
Mersenne Twister Seed
 
Oh man, can anybody help me get a working version of the mersenne twister going? i have tried about three or four different implementations now, including direc...
[4 replies] Last: Do not use #define where not necessary. If you're using the same seed... (by Athar)
by heidiK
Sorting vector values
 
I am using a vector which has struct type of elements in it. The struct is something like this: struct block { std::string id1; std::string id2...
[4 replies] Last: It worked :D BIG THANX Pax :) (by heidiK)
by Kyon
Hanoi
 
Not too long ago I saw a post about recursive functions, one of them had a rather odd name: SolveHanoi. Naturally, I googled the subject and found a neat mathem...
[2 replies] Last: Thanks, changed it, it works now! I just could not sort this error out... (by Kyon)
by heidiK
second last element of vector
 
Could anyone please tell me how to get the second last element of the vector since back() returns the last element Thanks
[5 replies] Last: YES it worked with +1 MANY THANKS :) (by heidiK)
C++ Basics
 
Hi, I was need some help understanding something. I have a book about C++ and anyways, I'm not really understanding how to do it. What there wanting is you to...
[8 replies] Last: Read Bazzy's link. (by moorecm)
by firix
a function doing Gaussian elimination
 
Hi friends, I'm "doing a Gaussian elimination function" did not understand anything.. friends can share information with knowledge on this subject? ...
[no replies]
typedef error
 
Hello, Good day to everyone ! This question sure has a simple answer, Look at the following code: #include <iostream> #include <vector> using std::st...
[4 replies] Last: Also, std::pair<> is declared in <utility> so you should include that ... (by jsmith)
Data won't flush into ofstream
 
I wrote this program to count the number of days I've been bored since today The program works by loading the number of days from a file named bored, and then ...
[2 replies] Last: I hadn't noticed that, but even after fixing it - the problem remains.... (by waqqassheikh)
Input method
 
Dear Sir, Consider the following code: The length of array is four and if I want to give only three character input then after pressing Enter key input ...
[2 replies] Last: Why not just use the istream :: getline () method? http://www.cplusp... (by Duthomhas)
trying to fill a c++ string
 
I have used getline to read a line into a string. now I need to go through the that string index by index I have a for loop it reads through the string I ne...
[1 reply] : hello pistol1, This will create a string named puzzle with '?' for ... (by coder777)
Sort isn't sorting
 
Heya. I have another case where functions aren't acting like they should. Or at all. The assignment is to write a program that tests a function that sorts ...
[1 reply] : hello Erdrigard, So... anybody know why sort isn't sorting? becaus... (by coder777)
by firix
assign a value to object with vector operator[]
 
Hi, I define a vector<int> ivec. After; ivec.push_back(1); ivec.push_back(2); ivec.push_back(3); ivec.push_back(4); now I'm trying to access. iv...
[4 replies] Last: thanks Why should I get the reference. (by firix)
I couldn't solve it alone
 
Hi everybody, I have a text file that I want to get its contents line by line, this code worked for me, but when I checked that array, I found that some line...
[4 replies] Last: Thank you, Finally it is solved. While I was working on adding some o... (by afathi82)
by Dave82
non-lvalue pointer error
 
Hi, I'm attempting to write a simple program using an array class implemented in a header file. Whenever I compile the program, I get a "non-lvalue in assign...
[4 replies] Last: Ok, just flipped through a text on reference returns, think I get it n... (by Dave82)
Redefinition error. What?
 
Hi, I'm getting an interesting error when I attempt to run a program. The error looks like this. Line File Message 7 J:\folder\sear...
[2 replies] Last: "Incidental multiple includes." That about sums it up. Thanks. I ... (by Erdrigard)
display longest word
 
hi i am trying to display the longest word in a sentence. first i am trying to display the length of the longest word but it is not displaying the correct le...
[8 replies] Last: #include <iostream> #include <string> using namespace std; strin... (by HooklessFastener)
Large amounts of hidden data
 
Hello, I want to write console application. To be more precise, it will be "Who wants to be a millionaire" game. It is just for fun, nothing else. So, I ne...
[5 replies] Last: That just make it easier for me to pick a suitable one. I figured it ... (by Disch)
A Problem with this simple game.
 
Well, Im very new to C++. Ive made very simple projects lately and I thought i could give a game a try. As my first game I wanted to go a simple as possible. A ...
[5 replies] Last: Thanks. I will change that. (by ThePixel)
math problems for c++
 
Assume that: x = 10; y = 20; z = 30; if ( x==10 && y<x || z>y ) cout<<"TRUE"; else cout<<"FALSE"; if ( y>z && (z<x || z>y) ) cout<<"TRUE"; el...
[8 replies] Last: no wtf this was a problem my C professor gave me, and i have been in t... (by slypenguinz)
Binary Search Trees
 
Hello all. Before I begin writing this program that deals with the insertion and deletion of Binary search nodes, I was pondering on which parameters I need ...
[no replies]
November 2010 Pages: 1... 2728293031... 42
  Archived months: [oct2010] [dec2010]

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