Beginners - November 2011 (Page 2)

Ages (1,2)
 
Hey guys :) I just started working on a problem that states "Write a C++ program for a theater that will keep track of a movie attendee. The program should a...
[20 replies] Last: Oh I am a biomedical engineering major with pre-med concentration. I h... (by controlstructure)
by Meziee
Battleship Program. HELP!
 
My professor wants to me to create a battleship program that has a grid of 15x15. The battleship program should have five boats in the game: Frigate: 2 locati...
[3 replies] Last: use a 2d array and set every spot on the grid to 0, next just come up ... (by bboy212)
by fniazi
reading and printing txt file to screen
 
lslf
[3 replies] Last: OP: include <stdlib.h> #include <stdio.h> int main() { FILE *file_... (by Moschops)
best SDL tutorial
 
http://lazyfoo.net/SDL_tutorials/lesson01/index2.php vs http://www.sdltutorials.com/sdl-tutorial-basics which is the better place to learn sdl
[5 replies] Last: I found focus on sdl a bit to rushed buth thx anyway (by bboy212)
save images from a given folder to a vector
 
Hi, I'm having an issue with a program I'm trying to write. The program's function is to take a user selected image and create a mosaic from other images in a p...
[4 replies] Last: Well I know how to load an individual image from a file and then displ... (by Richard Evans)
by asa828
setw(2) Why?
 
This is a code from one book that I am reading. My question is (as you will see bellow) why even when setw(2) is set on 2, I still get 201 21 18 when I pick eve...
[1 reply] : never mind. It sets MINIMUM of two characters, to be filled with '0' ... (by asa828)
Questions
 
Hi guys, I have two codes, both which perform the same function. The first code is /*This program was created to calculate the mean and standard devi...
[4 replies] Last: I mean, consider this: Average of two numbers: (a+b)/2 Average of thr... (by Caprico)
Comparing String Arrays
 
Hey... I was writing this code as a little project to help me study the presidents, (right now I only coded for the first ten). I never get "if (flag)" to be t...
[6 replies] Last: Thanks I'll try that... Nope It won't work it immediately goes negativ... (by christopher1997)
Access rights confusion
 
Greetings. I am rather confused about what i can and can't do. I am trying to write a class definition and am deciding on the return type of one of the member f...
[4 replies] Last: In the example you give do i have to overload the "=" operator? (by Ramzi89)
by izam88
Elevator Simulation
 
hai...i'm running windows 7 x64 and using Quincy 2005 as my compiler...i try to run/execute the Elevator Simulation program that i get from deitel&deitel book.....
[17 replies] Last: YEAYYYYYYYYY!!!!!!!!!!!! thanks for all your explanation...i can run... (by izam88)
ATM machine program help
 
Soo, this was an in class assignment I had to do for my class, where I had to write something resembling an ATM machine. The account is supposed to start with ...
[4 replies] Last: To handle unwanted input, have a check at the start: // Cout code ... (by Gaminic)
by gh24
Recursive Function Help
 
Hi guys, I am having trouble understanding how a recursive function of the following form would work: float max(float a, float b) { return (b < a )? a:...
[19 replies] Last: .53 and .47 probably act as determinate multiplying constants, and yes... (by Caprico)
Write to specific cell
 
Hi all, I'm looking in to writing a string into a specific cell in excel from my windows form, but so far have had no luck trawling the web. Could anyone ...
[3 replies] Last: No other ideas anyone? (by ahoysailor)
help with with arrays and functions
 
#include <iostream> #include <iomanip> #include <string> #include <fstream> #define MAX 100 using namespace std; /**************PROTOTYPES***************...
[2 replies] Last: I hope this is a cpp file. main should be returning int not void. Idea... (by jainabhikr)
How does passing objects to functions work?
 
I've been reading up on c++ a lot lately and I seem to be understanding everything, except this concept. I can't seem to find information anywhere about how pa...
[2 replies] Last: First, do you know how passing in a primitive type to function work? T... (by sohguanh)
Runge Kutta
 
Hi Guy, I am trying to write a simple Runge Kutta code in C++ but I keep getting this error: expected primary-expression before 'double'. This is my c++ c...
[2 replies] Last: As punjabian mentioned, there is no need to mention the type of the va... (by jainabhikr)
Comparasion between strings problem
 
int number; cout<<"How many product would you like to enter?: "; cin>>number; string *arr; arr = new string ; for(int j=0;j<sayi;j++) ...
[1 reply] : It's telling you that the std::string given to the first parameter o... (by closed account zb0S216C)
need help with a simple template function
 
I have this dummy template function that takes a vector of some type T, and returns the first element by using an iterator. This is just a simplification of wha...
[3 replies] Last: supposing I have a vector of integers: vector<int> myvec; myvec.push... (by ausairman)
sprintf
 
if i use %04d and %lu in sprintf,what will be the o/p and why
[1 reply] : This may help you: http://cplusplus.com/reference/clibrary/cstdio/spri... (by Zhuge)
Bool- if a pointer points to a certain class?
 
In an if statement, how would you check to see if a pointer to an abstract class points to one of its derived classes?
[8 replies] Last: http://www.cplusplus.com/doc/tutorial/typecasting/ (by Stewbond)
November 2011 Pages: 1234... 65
  Archived months: [oct2011] [dec2011]

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