Beginners - March 2012 (Page 52)

newbie questions about c++ exceptions
 
i was reading about C++ exceptions on this site and i can't get the point of it. i mean why use exceptions when i can just use if statements with cout or break...
[8 replies] Last: @cire: Sorry, I went back and re-read. Memory allocation errors tha... (by ciphermagi)
Help with char pointers
 
Hello, Thanks for your help. I'm at a conceptual roadblock with my study of char pointers. I am instructed to create arrays of char pointers in the Sente...
[4 replies] Last: Thanks again. That's what I ended up doing. Once I removed the {} an... (by Othaeus)
Turbo C Code
 
Hi I want to know how to get the right code for example 224-123 = 101minutes this is military time so I would like to know the code on how to output wil...
[1 reply] : If military time = hours*100 + minutes, then hours = military time/100... (by hamsterman)
Turbo C help
 
I'm having assigning range of numbers I want to assign 60minutes above duration of call = 15% discount within the time of 1800pm(6:00pm) before 0800am(8:00am...
[10 replies] Last: well, it doesn't matter if it's c++ or other input. The point is that... (by coder777)
Recursion
 
a
[12 replies] Last: Texan, great point adding count to the function def. Now if I could ju... (by darms21)
Storing Value
 
I was wondering how to store the value of an output to a function so that I can view that output anytime. For example, in a movie reservation (which is my curre...
[4 replies] Last: thank you! (by closed account 48CM4iN6)
Using String Arrays and Maps
 
Hello Everyone, This is my first post and I am really at the very beginner level of C++ (few days in) so lets see how this goes. I wrote a script in PHP b...
[6 replies] Last: If you use several strings for one key as in your example then you sho... (by vlad from moscow)
seat number
 
It goes like this. Enter the number for seats to be occupied, then each seat that is chosen must output . but I can only output it one at a time per input of ...
[3 replies] Last: The code was not succesfully sent a while ago , sorry (by closed account 48CM4iN6)
I need some help
 
So i have this problem but i'm still confused on how to compose a working code for it. Write a C++ program that will get a collection of n numbers from the u...
[9 replies] Last: #include <iostream> #include <vector> using namespace std; int main(... (by LB)
can someone help me!!!!
 
#include <stdio.h> #include <math.h> #define RATE 0.45 int main (void) { float begin; float end; float miles; float reim; p...
[1 reply] : scanf("%f", &begin); Likewise the other. (by Moschops)
by mj1709
naive
 
what is at the end of an integer pointer to an array; as in at the end of character pointer to an array , we have '\0' ; for e.g. int *num_string;char *...
[2 replies] Last: We expect that the program will abort. There is no allocated memory t... (by vlad from moscow)
C++
 
What are the ways to know about C++?
[2 replies] Last: I know only one way. It is reading books on C++ and writing programs. (by vlad from moscow)
A Query Regarding Structure Alignment
 
I'm trying to get my head around the whole structure padding thing. I know that it helps the CPU to read data from memory in words, but the issue I'm having is ...
[10 replies] Last: Thanks for the examples & explanations, Stewbond & JLBorges , I rea... (by closed account zb0S216C)
Vitrual Inheritence Help please
 
When creating two inheritence, how do i change the orignal class values example values in int example 6 to 7 which change for both inheritence so i dont need t...
[no replies]
Program works on my computer but not others?
 
Hello all. I'm new to C++ having come off Visual Basic, and am a bit confused. I have written a program to make a simple hangman game, and it works just fine of...
[3 replies] Last: Thanks for the help, it works fine now. (by kirbyman62)
Groups of 8 to groups of 6
 
So this is more of a logic question opposed to a code question. I am working a project for school and this is the part im stuck on. I have an array of integers ...
[15 replies] Last: > Whoops! Didn't know there was more than one. Wiki lists thirteen of... (by JLBorges)
Stream functions
 
I'm trying to write a function that acts as a phonebook; it looks up a person's first and last names and email address when given either the first or last name....
[3 replies] Last: if ( !fin ) { std::cerr << "Unable to open phonebook.\n" ; } ... (by cire)
Arithmetic Series Summation
 
I am writing a program for a class project. The program is to receive input from the user: first term of the series, the difference between terms, and the numbe...
[8 replies] Last: my error, wrong file... for (i = firstTerm; abs (i) <= abs ... (by dzimme2)
Printing ordered integers in arrays
 
Here are the specifications: Write a full program that reads in an arbitrary sequence of integers from the standard input, and writes them to the standard o...
[1 reply] : This is actually really easy using std::set, but since I'm pretty sure... (by long double main)
if else if and bools problem D:
 
/* 4-70 Triangles Write a program that will read three numbers (representing the lengths of the sides of a triangle) and print out one of the following ...
[15 replies] Last: OHH wow! thanks long double main! totally forgot about the breaks ! TH... (by magadavixt)
March 2012 Pages: 1... 5051525354... 71
  Archived months: [feb2012] [apr2012]

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