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; ...
[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; ...
[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...
[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...
[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...
[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...
[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...
[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...
[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...
[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 ...
[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...
[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...
[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;...
[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...
[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...
[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...
[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...
[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...
[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...
[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>...
[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.