Beginners - November 2011 (Page 3)

by gh24
Mac-Windows Code Compatability
 
Hi guys, I know this is a stupid question but I figured I might as well give it a shot... I am taking a C++ course currently and my prof. uses a mac and I...
[1 reply] : In terms of the actual code, as long as you stick with the standard he... (by Stewbond)
Help please with Function and Parameter Declarations
 
Help please, i am new to C++ and am working on Function and Parameter Declarations right now. Below is the task and then what i have so far...thank you for any ...
[12 replies] Last: #include <iostream> using namespace std; double mult (double num1... (by sledger87)
check to see if any number is assigned to a variable of type int
 
I need a to throw an exception if a has no value here is the code i have so far. its on the seventh line with the ??marks. istream& operator >>(istream& s, ...
[2 replies] Last: how do you implement that ? I cannot seem to get it to work wait i fi... (by Lazysquirell)
Press anything to exit...
 
In Microsoft visual studio, when you press CTRL + F5, at the end of the program, you can press anything to exit. How do you to put this into a program manual...
[2 replies] Last: http://www.cplusplus.com/articles/iw6AC542/ (by Duthomhas)
Strings & Error Msg (1,2)
 
I'm trying to write a program to prompt a user to input a first and last name, and then alter the name that was entered. The program should first replace all t...
[20 replies] Last: For those of you interested, here's my edited code. If anyone has poi... (by nerd1981)
by cogirl
Fibonacci and prime numbers help!
 
Hi so my assignment is to write a program in which you input a number and you get A) all fibonacci numbers up to input & B) display fibonacci that are also prim...
[12 replies] Last: OMG..Omg Omg!!!! Thank you so freaking much!!! that was perfect!!!! Ma... (by cogirl)
Why does the program crash?
 
Every time i run this program, it crashes, and i don't know why. It might be something obvious but I didn't notice anything wrong. #include <iostream> #i...
[3 replies] Last: haha no problemo. Always glad to help :D (by jp01cf01)
by Lizzie
Arrays to calculate frequency and percentage of dice rolls.
 
Hello. I am new to C++ and arrays. My program needs to ask the user how many times a pair of dice will be thrown and simulate that many rolls. Then it needs to ...
[10 replies] Last: Yes! Works great. Thanks for the education. (by Lizzie)
Need help with source code
 
Hi, I'm really new at this and would really appcreciate if someone could help me with my source code for this assignment. Here's the details: YOU MUST creat...
[8 replies] Last: Only if you want the array to be named "array". If you'd rather stick ... (by Moschops)
What am I doing wrong?
 
...
[2 replies] Last: OP: This is a project for school, and my output is supposed to be t... (by Moschops)
Fibonacci
 
Hey guys, I am a beginner in C++ and need help creating a C++ Code. The problem states: Write a C++ Program that outputs the Fibonacci numbers that are ...
[no replies]
sum of all?
 
how to get some numbers in input in one line (we dont know how many are they),and print sum of all? just hint to do it example input: 3 4 5 6 7 8 output: 3...
[10 replies] Last: I think the best way would be to use stringstream . Pass the string y... (by bbgst)
help with arrays
 
#include <iostream> #include <iomanip> #include <string> #include <fstream> #define MAX 100 using namespace std; /**************PROTOTYPES*************...
[1 reply] : Please use code tags. It makes it so much easier to read your code. f... (by Peter87)
Nested else if?
 
I really don't understand why i am getting an error on the nested else. (I am very new to cpp) if anyone could help resolve the problem that would be AWESOME. ...
[2 replies] Last: Thank you peter! worked like a charm. (by Chowderscripts)
HANDLE issue
 
okay, am multi-threading a couple of static class functions, and both functions use a handle i have defined in my header. here is the ONLY definition i have ...
[1 reply] : SOLVED. i set the HANDLE hHpSetMutex definition to static: static... (by tiennen07)
HELP mega error!
 
I'm in the middle of making a long multy function text based adventure game. And now out of nowhere all of my couts are undefined! In the main function th...
[3 replies] Last: sounds like you might have missed a semicolon. without an example of ... (by tiennen07)
by gh24
Global Variable From Command Prompt
 
Hi guys, I am trying to create a global variable that is read from the command prompt. I have no clue how to do this though. Can I just do something like: ...
[10 replies] Last: Ok cool. Just so I understand this let me paraphrase: I am opening t... (by gh24)
How to catch diff in cin.getline
 
Hi, I have a command line cpp program that works both with manual input and '<' from stdin. And now it behaves differently. with keyboard input it stops at cin...
[2 replies] Last: Thanks, Peter ! It's clear, is it possible to supply endl explicitly w... (by mario17)
by Cnewey
Pointer
 
Hi all I have a question regarding pointer. Hope someone can help me. Below are my codes, I have tagged: ======================================== int ...
[2 replies] Last: Thanks Jim for the very detailed explanation. (by Cnewey)
by Digits
Multi-dimension array randomize
 
Hi all, need to figure out how to randomize this multi-dimension array. Any ideas? Thus far... #include <iostream> #include <ctime> using namespace s...
[1 reply] : use can use std::random_shuffle (by Peter87)
November 2011 Pages: 12345... 65
  Archived months: [oct2011] [dec2011]

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