Beginners - October 2010 (Page 42)

Right angle triangles.
 
A program that displays a right angle triangle pattern. #include <iostream> using namespace std; int main() { int n; cout<<"Enter a number:...
[5 replies] Last: Pattern 1: /* Description: Left align, inverted right angle trian... (by Maestro)
Book Class
 
I have to make a Book class with members for the ISBN, title, author, and copyright, as well as checked in/out status. Functions that return those data value ha...
[6 replies] Last: @krad, I am also using Stroustrup's book to teach myself C++ progra... (by nathan10)
by HulioG
Assembly - How to access array cells (besides the base!)
 
My script below - will pass the base array $t0 and print it's content (which is 4). The array contains "4,6,2,3,11". I can access the first letter of an array...
[4 replies] Last: I assume you want your linear search function to search for a particul... (by jsmith)
table array problem
 
i have a problem in making an array representing a table as following: i have to prompt the user to enter x,y values to get another value needed for calculat...
[6 replies] Last: excellent, that is exactly what i meant thanks very much it was a... (by over the top)
Outputting table to text file. While loop problem!
 
Hi there. The problem that I'm experiencing here is quite a specific one, and after a few searches, I concluded that I ought to just ask. I have calculated ...
[5 replies] Last: Galik and Takiro, thankyou very much! The problem is solved. I reall... (by smithr3)
problem with sizeof()
 
Hello ,in the following code i use a double variable and a double pointer and i use the sizeof() function to examine their length. #include<iostream> usin...
[5 replies] Last: Try storing a pointer to a virtual method declared in a class that mul... (by jsmith)
Sketching curve
 
Recently i have an assignment to do, it is about sketching a curve. this is my code: #include <iostream> using namespace std; #include "svgforpa1.h" in...
[10 replies] Last: If you right click the top part of the console window, and choose "Edi... (by LB)
by blgblg
reading array from file
 
I'm trying to read a file with 2 rows and 6 columns of integer into a two-dimensional array. I'm not really sure how that would work... could someone give me an...
[4 replies] Last: thank you:) (by blgblg)
by Jsel
Re-opening closed files?
 
Hi there, I'm having a problem re-opening files of type ifstream that I closed. for example... ifstream file_in; file_in.open("data.dat"); file_in.close...
[4 replies] Last: That's a question that can easily be answered by reading the API on th... (by gcampton)
query on Console windows closing
 
Hi, I read the sticky, on console windows closing. so i did.. #include <limits> . . . . . std::cout << "Press ENTER to continue..."; std::cin.i...
[14 replies] Last: Yes. The newline character ("\n") represents the 'enter' key. You don'... (by closed account Lv0f92yv)
Odd error?
 
#include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv ) { char buffer[ 30 ] = { 0 }; int c = 0; ...
[5 replies] Last: getline( ftw ); (by gcampton)
How to make a simple Calculator?
 
This week I have to make a 4 function calcualtor ( + - / *) But here is the catch...I have to enter a number, enter a operator, then enter another number. I ...
[12 replies] Last: OK so now we are getting into realms of user not entering a number but... (by gcampton)
why does not return error?
 
Hi, i use MS visual studio 6 and i wrote the following code: #include<iostream> using namespace std; void something(int a,char b); int main() { r...
[2 replies] Last: Ok,thanks ;) (by kikirikou)
c++ palindrome problem
 
thanks
[12 replies] Last: well, then use (0 != strcmp(word, "END")) (by coder777)
my logic is wrong
 
i am having trouble with the calculation logic. pls take a look at my code... #include <iostream> #include <limits> int main () { int totalminut...
[1 reply] : The logic as it is is correct. If x is a time span in minutes and you ... (by helios)
beginner at loops
 
Ok so i'm trying to write a program that writes out first 20 lowercase letters and them sort them into a number of columns between 1-5 that the user types in......
[3 replies] Last: Don't post full solutions, sahguanh. That doesn't help him learn, and... (by Disch)
How do you implement a wait time?
 
I've been wondering about how everyone else does this. Is it possible to print messages from a vector every second while continuously loading more messages into...
[3 replies] Last: sleep() is the easy way to do this: http://www.delorie.com/gnu/docs... (by kfmfe04)
Making basic for-loop to print progress bar
 
Hey guys, I've had a little experience in C and now I'm taking a small class in C++. There's one project I'm working on in C++ that could have been pretty with...
[2 replies] Last: [quote=joshjennings]All that happens is there's a pause (since there a... (by PanGalactic)
blackjack game
 
hello i am working on a blackjack game,it asks randomly generates numbers, then user has to input them. the program then calculates the total. if it is less th...
[1 reply] : A simple loop would work: while (handValue < 21) { /... (by MottMan)
New to Programming
 
Hey all, I'm just a "Newbie" to the concept of actual programming; I've done a few "Mods" for video games with scripting, but it's nowhere near as close to the ...
[1 reply] : Site Tutorial: http://www.cplusplus.com/doc/tutorial/ I personally ... (by MottMan)
October 2010 Pages: 1... 404142
  Archived months: [sep2010] [nov2010]

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