Beginners - December 2016 (Page 10)

by louwin
Please check my coding for Thread Safety issues
 
I struggled through writing a Mandelbrot program. Over time I got it right where I wanted it. It works almost perfectly. Then I thought I could speed it up som...
[4 replies] Last: An example image class: class Image { public: Image(unsigne... (by Norm Gunderson)
by wolfv
struct vector for path, file, and stream?
 
I have project that is passing around a lot of path, file, and stream arguments. So maybe a struct vector can contain all that information, and reference the v...
[6 replies] Last: OK, that's what I needed to know. I would have taken me a long time t... (by wolfv)
How to make it "snow" in command prompt.
 
Hello. I need to make an array of 50 points or coordinates on the command prompt. They need to start in a random position off the screen. I need to make a timer...
[7 replies] Last: Another bit of tongue-in-cheek silliness. Based on the stuff I posted ... (by Chervil)
by RNBW
Formatting Numbers
 
I have just started learning C++. I have used printf() with C in the past to format numbers. this doesn't seem to be favoured in modern C++. I find using s...
[3 replies] Last: Thank you bird1234 and gunnerfunner for your responses. I know I can ... (by RNBW)
by Enot02
It's back...
 
What is it? It's EAccessViolation. Code: //--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop...
[16 replies] Last: @lastchance Thanks for this - I like your code rather better than what... (by Chervil)
Help with calculation of the cost of a call
 
I have a few variables and constants that I want the use. First you put in a start and a end time(hh:mm). Then I convert that to minutes with is totMin. So for ...
[4 replies] Last: #include <iostream> #include <string> #include <sstream> #include <i... (by markusfurst)
by xx123
2d grid using array c++ (1,2)
 
I have to create a grid that start out in the position left top corner (0,0). Then the program would go randomly up down right or left until it gets stuck or re...
[32 replies] Last: Ah, well done @xx123 - you persevered for a long time. And thanks for... (by lastchance)
by fg350
Splitting a linked list into two lists
 
Hi everyone. So I wrote a function that adds a set of XYZ coordinates to a linked list, and that all worked fine. But now I'm trying to figure out how to take t...
[3 replies] Last: "any of that"? Seriously? Surely you do understand line 1, the getNex... (by keskiverto)
Functions Help
 
I'm trying to make a simple menu-driven application that calculates miles to kilometers and vice versa. It won't compile due to errors towards the bottom of the...
[2 replies] Last: Thank you so much! I forgot about the "return" command. Hehe. I won't ... (by CobaltThunder)
Please!! need help in outputing the even numbers of myvector into a file
 
Write your question here. Hi guys, I am new c++ learner, I have stuck in copying the even values of myvector into a outfile stream, the program prints the re...
[1 reply] : http://www.cplusplus.com/forum/general/204728/ (by integralfx)
Difference between getlines
 
I wanted to know the difference between input, can some one explain the difference between cin.getline(); getline(cin, keyword); and cin >> keyword; and any oth...
[1 reply] : The biggest difference between getline(std::istream&, std::string&) an... (by jlb)
Dice roll, randomGenerator
 
The program works fine but how can I get a output like this?(Rounding of the precent, to whole numbers without decimals) 1:s = 1 Precent = 14 2:s = 1 ...
[12 replies] Last: Thanks for the additional links, thanks (by gunnerfunner)
Using Iterators and STL in C++
 
Write your question here. Write your question here. I am having a hard time understanding what I am doing wrong in this program and was just wondering if som...
[6 replies] Last: if(!iter->lname.at(0) == firstchar) this is wrong syntax and notion ... (by gunnerfunner)
Is there a way to check if input is a int/char and treat them differently?
 
Here's my program, I currently use'999' to terminate the input but if I want to use for example 'enter q to end' is there a way to do that? thanks #in...
[4 replies] Last: thanks (by AlexYoooooo)
Median and sort
 
Write a function returns the median entry in a 1-dimensional array of integers. if we have an array a={3,4,5,1,6}; then the median entry of this array a is...
[2 replies] Last: #include <iostream> using namespace std; int function(); int main... (by closed account 48T7M4Gy)
Reading text files in Xcode
 
I have a program that needs to be able to have a file name inputted and from that input open a txt file to be read from. But I can't seem to get it to open them...
[1 reply] : http://www.cplusplus.com/forum/general/204722/ (by closed account 48T7M4Gy)
Help adding a negative # error message
 
I need help with adding a number range for a for statement. If the number is negative -1 then an error message should appear and prompt the user to try to enter...
[1 reply] : http://www.cplusplus.com/reference/ Try this link and type in the key... (by closed account 48T7M4Gy)
by bmoney
Phone Number Program
 
Hello everyone, I am new to this forum and am looking for some assistance, any help would be greatly appreciated! I am stuck on this assignment for my programmi...
[2 replies] Last: Hello bmoney, Instead of a lengthy explanation here is the changes I ... (by Handy Andy)
Creating a triangle strip with sfml error.
 
When I was crating a trianglestrip, I encountered an error; Not an error, it still works, it just doesn't "Work". I am trying to create a terrain and it just co...
[4 replies] Last: Ok. Thank you! (by Optimistic Peach)
Discount for a call between two times
 
I'm trying to calculate the price for a call(24-hour clock). I want the caller to get a discount of the price if she/he DON'T talk between 08:00 and 18:30. I tr...
[6 replies] Last: http://www.cplusplus.com/forum/beginner/204718/ (by closed account 48T7M4Gy)
December 2016 Pages: 1... 89101112... 28
  Archived months: [nov2016] [jan2017]

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