Beginners - June 2016 (Page 8)

Help with graphing and maybe loop.
 
So for this program, I want to ask the user how many circles and rectangles to be shown in the graphic window. #include "iostream.h" #include "graphics.h" in...
[1 reply] : Hi, You are missing a bracket ("}") above void renderScene () ho... (by shadder)
"Coordinate" system not working in game
 
So I made a program called "Battleboats" that is a version of Battleship. It lets you input coordinates and then the other person will try to guess them. Howeve...
[1 reply] : foo.cpp|12 col 6| warning: variable ‘blue’ set but not used [-Wun... (by ne555)
Creating a Header File
 
I was working on creating a header file to contain useful functions that I defined that seem useful or interesting enough to be used again. Currently it only ha...
[3 replies] Last: Thank you the header file is working fine now. I did not know that you... (by Too Explosive)
How to add a menu to Number Guessing Game
 
OS: Windows. 1) Best way to add a menu in my program's format. Loops or Switch statements? How to proceed? 2) Why doesn't #include <cwindows> work? 3) Using th...
[3 replies] Last: welcome :) (by shadder)
New to 2-D array
 
I am just gathering some knowledge about c++ 2-D arrays for an assignment. I am given a file with (n) number of records, and each record has a score (0-100),...
[11 replies] Last: thank you very much...this will help me in understanding c more.. (by ramboqr1717)
Learning C++, practice with for/while loops
 
Had an idea to learn. Layout below. // Program layout // There is a room of 10 doors // Computer chooses at random which are open and which are closed // One d...
[1 reply] : For your if statement using the condition of response, it has to be in... (by mossyhorn)
by FBHSIE
How would I set up this code?
 
For my homework, we have to do this. http://prntscr.com/birkvl I'm just not sure how to setup the mathematical expressions that would help me calculate the...
[6 replies] Last: Eg if you had 45 days then they convert to 45/7 weeks and 45%7 days re... (by closed account 48T7M4Gy)
by FBHSIE
Confused about module call
 
This is in digital picture mode, so I can't paste the code here. I can only give screenshots. http://prntscr.com/biqx2q http://prntscr.com/biqxaa http://prnts...
[1 reply] : Given your current code, you are indeed right, the function getHoursWo... (by Shadowwolf)
opening .txt from a directory
 
hi, im trying to open some .txt files from a directory but idont know how many files are there and i want to do it in a loop. i have already used dirent.h libr...
[2 replies] Last: it was useful, thanks (by steven8)
Help creating first C++ program
 
Hey guys this is going to be a bit of a novel but I’ll try to keep it as short as possible. I'm going to start learning C++ and at the same time I’ve jus...
[10 replies] Last: I guess some of the things which may help you decide which system to g... (by TheIdeasMan)
by rrifai
some kind of error
 
I can't seem to find the error, but there is one because the sample output is completely incorrect. #include <iostream> #include <fstream> #include <s...
[2 replies] Last: Hi, The first problem I see i this [code firstline=27]int nvow=0; //.... (by shadder)
Integration>
 
I'm trying to create a "inventory selection" type of thing, but I'm having trouble integrating the functions for each of the separate packs without problems. Th...
[1 reply] : You can use a std::map #include <functional> #include <map> string... (by a k n)
calculate average values of a sinusoidal signal
 
I want to calculate average values of a sinusoidal signal with the period 0.02s in the interval of 0.0001s. The signal I measure by a sensor. I make some codes ...
[3 replies] Last: There are two possibilities depending on what sort of information the ... (by closed account 48T7M4Gy)
Function that can accept another function
 
I want to make a class with a function, that can accept the function of another class, with a vector of arguments. And perform the function with each of those a...
[1 reply] : search for "function pointer" in cpp e.g. http://www.cprogramming.com... (by closed account 48bpfSEw)
by Nagi21
For loop madness
 
So I recently came upon a problem that required me to add the digits of an integer together and output the sum (ie 111 would equal 1+1+1 = 3). Originally I had...
[5 replies] Last: #include <iostream> int main() { int n = 1234; int sum = 0; ... (by closed account 48T7M4Gy)
Switch statement
 
I am working on the question from this post: http://www.cplusplus.com/forum/beginner/182764/ I thought I had correctly made the changes listed in the repl...
[2 replies] Last: Cannot use insertion operator, <<, on a string. Replace return "inv... (by vin)
by zionet
ccc
 
ccc
[12 replies] Last: ooh! (by shadder)
by zionet
PROBLEM Read bit size keyboard and use bitset
 
As I can read the bit size keyboard and use that data with BITSET , can enter the correct code. #include <iostream> #include <bitset> using namespace st...
[3 replies] Last: http://www.cplusplus.com/forum/beginner/192968/ (by closed account 48T7M4Gy)
Opening a file
 
I'm trying to write to a file and open it, but I only get my default statement. void getFile(ifstream& writeFile) { writeFile.open("\n ch9ex6.txt");...
[3 replies] Last: I meant that my two lines replace the corresponding two lines you had ... (by closed account 48T7M4Gy)
Password Verifier - Need Help!
 
I have tried just about everything I can think of, I keep getting runtime errors. I am checking for alphabet first with "isalpha" before I add "isupper" & "isl...
[4 replies] Last: = is assignment. == is comparison. You've forgotten that in a few... (by cire)
June 2016 Pages: 1... 678910... 25
  Archived months: [may2016] [jul2016]

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