Beginners - June 2014 (Page 21)

switch statement
 
guys i always get an error in switch statement error: switch statement not an integer switch(select){ case: "Register" { Registration(); brea...
[2 replies] Last: For e.g. int select; printf("1. Register"); printf("2. UnRegister");... (by Himanshu123)
by gduong
Headers and source file
 
I am trying to learn how to use headers and source file. I have been reading this http://www.cplusplus.com/forum/articles/10627/. My error is: Error 1 error ...
[2 replies] Last: WOW i am so bad. I fixed it and it works. Thank you. (by gduong)
Getting into sdl
 
Just wondering what are all the basics I should know before getting into sdl. As of now, i have a basic understanding of loops, arrays, input/out, conditional s...
[4 replies] Last: Well, you don't really need to know much about classes or anything muc... (by TwilightSpectre)
by zionet
Help. Counting the fraction more repeats in two vectors
 
Greetings, I have a great doubt wish to have the most common fraction, knowing which are the numerators and denominators on a table in another. Example: #inc...
[1 reply] : hint: std::unordered_map<std::string, int> http://www.cplusplus.com/r... (by Smac89)
Creating enum and functions
 
How do I create an enum for this? Write a program that determines which of a company's four divisions (Northeast, Southeast, Northwest, Southwest) had the gr...
[1 reply] : Enums is typically a way for giving numbers names (each name in an enu... (by crimsonzero2)
HELP :-(
 
Write a program that simulates coin tossing. For each toss of the coin, the program should print Heads or Tails. Let the program toss the coin 100 times and co...
[1 reply] : See if this article helps: http://www.cplusplus.com/articles/iw6AC542/ (by Zhuge)
Reading from a file on a specific location
 
How do you read from a file and give a specific location? I know there's the Constructor for fstream and the open() function. And in most tutorials I've seen (i...
[2 replies] Last: But of course! How did I manage to forget that! Thank you very much! ... (by Revolver)
Classes
 
Hi ! I have a question about a couple of lines in this code. I was just wondering what exactly is the purpose of lines 39-46? Why do we "redefine" (sorr...
[2 replies] Last: Thank you very much! (by NookLines)
array variable length
 
i have a question, i kind of simple for you maybe. I'm building a program that calculates plumbing for a building by Bricks. And the code is quite easy, I'm p...
[3 replies] Last: oh you are correct. just use std::vector then (by Little Bobby Tables)
Help on file read
 
Hi, I am writing several numbers into a .dat file and then read them. But I find out if write a '282' int number into the dat file, I'll read out '0'. Other i...
[no replies]
Seems like I still don't fully understand includes after years sometimes...
 
Hi guys, I have two include related questions because I sometimes run into include problems and only get them solved very very diffecult and time (solving-time...
[2 replies] Last: Ahh ok because I remember that I sometimes couldn't use code completi... (by Darklink2000)
Weird error after program finishes execution
 
The program crashes after it displays the users name for the last time. I inserted a system pause in the for loop where I think the problem is occurring. Any ad...
[2 replies] Last: Thanks! (by ajmalone0)
Pulling info out of a user input array.
 
I think I have most of this fairly close. I am trying to pull out the average, which I am getting, as one of the three things I am trying to do. The median an...
[5 replies] Last: Still need a little help on this one. (by Ruthgar)
ios::binary not working
 
I've started getting used to working with files, and have just learnt about the modifiers I can give when initializing fstream s. I've tried practicing with th...
[3 replies] Last: Well, not all files are ordinary text. For example there are images *.... (by Chervil)
Private Static Variable Initialization (redux)
 
This is actually an added answer to a closed question. TaylorCoons8798 wrote this: http://www.cplusplus.com/forum/beginner/125835/ I wanted to add that...
[no replies]
by nish97
Problem with While Statement
 
I'm new to C++ and only been learning it for 3 days and so don't know all the syntax but I have a problem with this while statement. If anyone could help me it ...
[1 reply] : Line 9: You want an and condition (&&), not an or condition. If fri... (by AbstractionAnon)
by send
Falling grain animation in grain sorter
 
So i do understand and made 3d object. But what about the falling particles (corns)? Here is fine example https://www.opengl.org/discussion_boards/showthread.ph...
[no replies]
Re-call Variable from "If-Else" Statement
 
So, I'm trying to make this menu application w/o using objects for practice, but I have an issue but I don't know how to fix it. I want to change a variable (th...
[12 replies] Last: Sorry for the somewhat late reply, and thanks Dput. All of your code w... (by nsahawks7)
by Peds
Logarithmic Size Bins
 
I have a file containing data for a large number of particles (approx 10^8), that need to be put into both size and density bins - similar to a 2D histogram. ...
[2 replies] Last: Thanks alot!! (by Peds)
Files (stucturing my code for optimisation)
 
Hi, Again, thanks for any and all help given! I am new to C++ and come from a background of VB 6 and VB.Net. I want to try to optimise my code and make...
[1 reply] : You have described your program in prodecural terms. And that's fine.... (by kbw)
June 2014 Pages: 1... 1920212223... 48
  Archived months: [may2014] [jul2014]

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