Beginners - March 2013 (Page 71)

cin.get... cin.ignore... why bother?
 
Hi, I'm a little confused. I wanted a program to 'wait' for a newline, or input... I've tried the following. char temp; cin >> temp; cin.ignor...
[5 replies] Last: Well, I bet that helps an awful lot... Sorry for my previous confusion... (by TheBeardedQuack)
C++ Matrix
 
Hi all, I`m very new to C++ and I have a homework from my c++ teacher. A part of my homework is to make a 5x5 matrix and to show it on the screen. Another par...
[2 replies] Last: Random number generator: //random numbers: #include <iostream> #inc... (by mausy131)
using BFS to find shortest path.
 
Let's say I have a graph using strings, such as locations. I want to be able to get from x to y in the shortest path possible. X and Y are user defined. I've...
[3 replies] Last: BFS doesn't really change from data type to data type since you are on... (by K0T4K0t4)
Generating Random black and white spaces repeating problem.
 
Hi, I am currently attempting to create a 7x7 grid that will be filled randomly with black and white spaces. On top of those spaces are a start and end space m...
[no replies]
by rcast
Scope question
 
If I had a variable int traps defined in main(), passed by argument to another function, lets say play(traps) and then a separate call to another function layT...
[6 replies] Last: rcast, where's this list of programs you're going to be making? I'm bo... (by Lynx876)
by arashf
Problem in making mtrand work
 
I am quite a beginner in c++. I want to use C++ Mersenne Twister Pseudo-Random Number Generator provided by http://www.bedaux.net/mtrand/. I put mtrand.h, mtran...
[7 replies] Last: I found this helpful http://www.cplusplus.com/forum/articles/10627/ (by arashf)
Element Shifting
 
So, I'm supposed to create an array with 7 elements, output it, then use a function to duplicate that array EXCEPT make it one element larger. Then it should sh...
[3 replies] Last: Thanks guys, that worked just fine. Seemed to be a stupid mistake on m... (by SB Onyx)
by odai
who can help me ^_^
 
If i have a class school .... how can i write this function because i cant understand it !! help me please c) Function called Add which takes tw...
[12 replies] Last: so !! , did you men i must put abject !! look my friend this is all ... (by odai)
by krutuk
Problem with output
 
Hi everybody! I work at some program and don't know how to write correct to output structure. Here is a code. Please, help me with it. Program compiling. After...
[3 replies] Last: Can you explain deeper about "pure evil". What you're implementing ... (by AbstractionAnon)
Can someone help me spot my errors?
 
Hello everyone, so I have the following code for a school project. I have included the code and errors, would someone mind helping me on where i went wrong here...
[5 replies] Last: Mailbox has no method of inbox(). (by Lynx876)
template dereference of an iterator
 
How can I dereference a template iterator to its value type? template<typename It, typename CIt = const It> struct iterator_reference_subcontainer { typ...
[2 replies] Last: I hope by "declspec" you mean "decltype", in which case it might have ... (by LB)
by vrakas
Shift operators
 
Hello i am reading an article in topcoder and it says "When executing shift instructions for a << b, the x86 architecture uses only the bottom 5 bits of b (6 f...
[2 replies] Last: The standard says this about the shift operators. ยง5.8/1 The beh... (by Peter87)
Fibonacci Sequence
 
I have written this code to calculate the nth number in a Fibonacci Sequence. However once I debug the code and enter a value, the box disappears. Does anyone h...
[4 replies] Last: After this instruction cin >>n; there is a newline character remaini... (by Chervil)
by rcast
Tic Tac Toe - Finding the winner
 
I'm having trouble getting the bool winner to evaluate to true if p1 selects 1 2 and 3 from the board. Which would be a win. It just keeps going. This code is ...
[18 replies] Last: To be honest, I never knew about ( move + '0' ) until last night, when... (by Lynx876)
What did I do wrong?
 
Hello everyone! I've just started with c and I think it's really fun! even though I can't do much... I have previous knowledge in a program language calle...
[3 replies] Last: Please excuse my mistake. The language I'm trying to code in is c++ bu... (by kinkita)
Overloading operations
 
I've run into a slight problem with this bit of code I'm writing. cout << "\nTest " << test++ << ": Subscripting\n" << endl; const Vector3 v5(3.2, ...
[2 replies] Last: What does mean this text "float Vector3::operator (int) <near match>"?... (by vlad from moscow)
Fibonacci code
 
I am trying to write a code to calculate the nth number in a Fibonacci sequence, where the user enters n in the program interactively. I have written this co...
[19 replies] Last: I now have this code #include <iostream> using namespace std; int mai... (by LoopingBird)
by Cman87
XSL Generation and BIFF format, how to do it..
 
I need to create a Excel file through C++ is it possible? The generated file should be independent from the running platform also. I googled a bit and found ...
[no replies]
by krutuk
vector initialization
 
I have a little program and a big problem with it. I can't find out how to solve it. The program doesn't compile. Here is a code #include <iostream> #incl...
[2 replies] Last: Thanks man, I understood. It works. (by krutuk)
Unnecessary Figures
 
I've been poking around for a while here and can't seem to get headway. My overall program is finished, however before I begin documenting and clearing any stra...
[7 replies] Last: Thank you all for your contributions and I appreciate all the input. (by zero117)
March 2013 Pages: 1... 6970717273... 87
  Archived months: [feb2013] [apr2013]

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