Beginners - July 2016 (Page 30)

Writing a map to a file
 
I have a map<string, vector<double>>. But I'm having some trouble accessing it (to write it to a file for example). This is my loop to print the map. The prob...
[4 replies] Last: Thanks everyone for your help. Now I have a couple ways to approach it (by closed account oEwqX9L8)
Adding up array and returning bool function??
 
Hi there! I'm wanting my varSum function to take in an array with a value of N, where if the sum of the array ==15 it returns true, false otherwise. I am ha...
[1 reply] : A few problems: Line 4: You need a function prototype in order to ca... (by AbstractionAnon)
How can I justify my cursor to line up with my output colums in a terminal program?
 
Hi guys. So the problem I'm having is that when you enter a value for the radius (rad) variable the cursor wants to work its way from the left to the right when...
[2 replies] Last: In order to do what you want, you must know the width of the user's in... (by Duthomhas)
largest factor of a number
 
here is the code for Displaying Factors of a Number #include <iostream> using namespace std; int main() { int n,i,a; cout << "Enter a positiv...
[8 replies] Last: At this point I believe you are just asking someone to do your thinkin... (by Duthomhas)
Simple Game
 
I started writing this classic snake game today that runs on the console. It's principle is same with the classic snake. (ie eat a fruit and the snake grows big...
[5 replies] Last: Since you're doing this in the console, maybe see if ncurses/pdcurses ... (by Albatross)
by jtm013
Comparison Program!!!
 
I have no clue where to start with my code or the format for doing so... The following Chapter 4 Lab questions ask you to predict the outcome of several code...
[1 reply] : See http://www.cplusplus.com/forum/beginner/193645/ (by closed account 48T7M4Gy)
by feeks
From single to Doubly Link
 
Chapters 10, 12: This is a two week assignment. Modify the linked list example in the book so that it is a doubly linked list. Prove that your program works p...
[3 replies] Last: When I compiled your code using a C compiler, i received no errors. I... (by AbstractionAnon)
How to print a very big value.
 
I am a newbie. Please bear with my silly question please. Why any one of this is not giving correct result?? #include <stdio.h> int main() { printf("%...
[4 replies] Last: But my program goes like this. I guess it doesn't since that code wo... (by Chervil)
Grading Program
 
I was practicing with a grading program, and i have a few questions. Here is the code #include <iostream> using namespace std; int main() { double gra...
[2 replies] Last: If you write a character where instead of a number in "grade", it jum... (by shadder)
Calculate intersection points of line segments
 
I'm trying to calculate the intersection points of two line segments. So I got n points stored in a vector called "boundingbox" and m points stored in a seco...
[16 replies] Last: Whether the requirements apply to extended lines or line segments is o... (by closed account 48T7M4Gy)
by Laskio
If and else wont work?
 
The else doesn't work? It only does the Yes form and wont go to the else cout. Any suggestions? string rules; { RULESOF_OPTION: cout << " ===RULE...
[3 replies] Last: Hi, Should also avoid goto , use loops and function calls instead :+... (by TheIdeasMan)
cin>> on a for loop
 
My output is coming out funny suggestion how to fix plz? for (counter=0; counter<3; counter++) { cout << " Price per gallon at the gas s...
[5 replies] Last: I knew it was something like that. (by closed account 48T7M4Gy)
Basic Combat Game?
 
Hi, I am trying to pick up C++ I started about 2 weeks ago and took on a combat game as practice. Using Visual Studio 2015 to run. I keep looking, and I fee...
[4 replies] Last: [quote=binghamhunter] I'm going to keep messing around with it and try... (by closed account E0p9LyTq)
by Laskio
How to go back to a previous IF statement?
 
How can you make a code go back to a previous point? Ill make an example to help you understand what I mean. #include <iostream> #include <string> using ...
[9 replies] Last: Ah, the age old question of "how do I accept only certain types of inp... (by closed account E0p9LyTq)
July 2016 Pages: 1... 282930
  Archived months: [jun2016] [aug2016]

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