Beginners - July 2012 (Page 17)

does not output what i want. loop might be broken
#include <iostream> #include <fstream> #include <iomanip> #include <string> using namespace std; bool validation (char c) { bool result = false; ...
Jul 22, 2012 at 6:39am
[5 replies] Last: I completely forgot that && and || have different precedence. I need t... (by Volatile Pulse)
I cannot get my subtring to work
#include <iostream> #include <fstream> #include <iomanip> #include <string> using namespace std; bool validation (char c) { bool result = false; ...
Jul 22, 2012 at 6:25am
[1 reply] : Is this a duplicate of http://cplusplus.com/forum/beginner/75724/ ? A... (by closed account o3hC5Di1)
Program Not running right
Hi there, could you help me out? I am making a program "for fun", and it stops taking input from the keyboard after I answer "Have you been fired from a job be...
Jul 22, 2012 at 6:24am
[4 replies] Last: I believe other issues are the fact that you have declared everything ... (by Volatile Pulse)
Switch ERROR
Hello. I was trying to make a program using switch case. I got an error- 1) switch selection expression must be of integral type in main function(). Progr...
Jul 22, 2012 at 6:13am
[2 replies] Last: Hi there, I got your program to compile by changing the first 5 lines... (by closed account o3hC5Di1)
int help!!
I'm trying to make a program that tells the user to enter a population number and estimate what nation has the population number. Anyways, when I entered an int...
Jul 22, 2012 at 3:43am
[9 replies] Last: OH SNAP! I SHOULD ADD THEM IN! I'm too lazy to put in more countries l... (by DetectiveRawr)
by Luke95
Giving values to arrays
I have 5 arrays for 5 different cars racing on a drag strip. I need to give the first slot in the array --> <-- or 's'a RANDOM value. For each time these cars r...
Jul 22, 2012 at 2:31am
[6 replies] Last: Sounds good - cheers :D (by soranz)
ERRORS C2227 and C2228!
I am trying to make a program on Microsoft Visual C++ which takes in your name and as output should say "Hello (Name)". I know a little about C++ and i got 2 er...
Jul 22, 2012 at 2:13am
[4 replies] Last: I have made a Paste bin of the entire thing which I believe is what is... (by natarajadithyan)
Did I do this right!? :D
/*Ask the user to enter an integer and tell whether if its positive or negative*/ #include <iostream> using namespace std; int main() { int num; co...
Jul 22, 2012 at 2:07am
[10 replies] Last: I know that both will evaluate in the same way, what I'm wondering is ... (by georgep)
by Untrue
InsertSort using Link List
Hey guys I'm still stuck in link list. (sigh..) I don't have much explanation on how the program does but I'll just upload the concept image in my mind. The p...
Jul 22, 2012 at 1:21am
[2 replies] Last: This doesn't look right for(Shift=0; Shift>Position ; L->E[++Shift])... (by Untrue)
What do i do in C++ now?
So i have learned the basics of C++ like arrays, new operator, memory management, headers structures, loops, basic text file stuff basic stuff. but i am moving ...
Jul 22, 2012 at 12:46am
[3 replies] Last: http://www.cplusplus.com/forum/beginner/75558/ (by Need4Sleep)
by codder
for bug?
for(int i=0; i<2; i++) { for (int j=0; j<array ; j++) fprintf(f,"%d - called\n",array ); } array and array have "2" as value but instead of getting...
Jul 22, 2012 at 12:39am
[7 replies] Last: ok sorry i fixed it. it was the array.. it wasnt initialized right tha... (by codder)
Odd Behavior in If Statement
I have been teaching myself c++ for a few weeks now and I've never had any problem I was unable to solve on my own until now. This program seems so simple but I...
Jul 22, 2012 at 12:36am
[4 replies] Last: Alright, thanks again (by xlightningz)
Please help with my question
Can someone please help me with the following question? I'm stuck! Consider the following class definition. class Flower { private: string color;...
Jul 21, 2012 at 10:52pm
[2 replies] Last: NwN, surely ii) is not about scope but about the function itself? The ... (by georgep)
If you are given a C++ book, what would you do?
I'm trying different techniques to learn C++ from a book. Anyways, what did you do when you learn C++ from a book? Do you read then,summuriaze them? Anything th...
Jul 21, 2012 at 10:07pm
[11 replies] Last: Alright, now this might work! (by DetectiveRawr)
Cannot copy vector
Hi all, I've created a sieve of eratosthenes. The intial vector contains numbers 1- howmany and then replaced with 0 if not prime. I want to remove the 0s...
Jul 21, 2012 at 8:18pm
[2 replies] Last: Ah great thanks. (by rozick1)
object not created.
Hi everyone, I have a bit of a problem with the following code. It won't compile, giving a couple of errors (semi-colons missing that I can't track down, cl...
Jul 21, 2012 at 7:59pm
[10 replies] Last: Thanks guys, it's working now! Sure will look out for that #ifndef ... (by sfBlackfox)
by Owain
OpenGL Access violation
Hello, I am following this (http://openglbook.com/the-book/chapter-2-vertices-and-shapes ) guide to teach myself OpenGL. I followed the second chapter very carf...
Jul 21, 2012 at 7:09pm
[3 replies] Last: http://openglbook.com/glgenvertexarrays-access-violationsegfault-with-... (by naraku9333)
Average Netpay
Alright so I'm expanding further on my first payroll program and I have it executing pretty good right now. Now I want to calculate the average of all employee...
Jul 21, 2012 at 6:35pm
[no replies]
What's wrong with my code?
I don't really see the thing I am doing wrong. Thanks. void Test::AssignToRods(double a,double b,double c) { GetPosition(a,b,c); AssignRodA...
Jul 21, 2012 at 5:47pm
[2 replies] Last: OhoHohoOH. Stupid me. Thanks. (by Marioqwe)
My TIC TAC TOE game
Hi,I am a beginner in C++ and I have made the following Tic Tac Toe Game.Please comment on it and tell me how i can improve it.Thanks. #include <iostream>...
Jul 21, 2012 at 4:48pm
[11 replies] Last: Hi there, I still stand by my point of reducing the size of your chec... (by closed account o3hC5Di1)
July 2012 Pages: 1... 1516171819... 54
  Archived months: [jun2012] [aug2012]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.