Beginners - January 2016 (Page 2)

float variable won't print desired number of digits
 
I would like the output to print 4.0. When the program runs it prints 4. I've tried changing setprecision and changing float type to double, but no difference...
[2 replies] Last: You probably want to use std::fixed. cout << "Float is " << fixed <... (by Peter87)
How to make quicksort work properly?
 
Hey guys, I'm trying to figure out what exactly is needed to make this quicksort work properly. I am receiving an error saying, primary expression before ']' T...
[2 replies] Last: Thank you naaissus! It works like a charm, also thanks for the better ... (by C0D3FR3AK)
SOLVED
 
SOLVED
[2 replies] Last: If we add a little output in, it becomes clear at what stage the error... (by cire)
Whats wrong?
 
Hello. I need to write program, which would find the lowest element of matrix, find the line in which this element is and count average of this line. So whats w...
[1 reply] : So whats wrong with my program. Your indentation for a start. What'... (by kbw)
Find Syntax error in the program and rewrite program
 
Okay i am sorry at first place for putting question i know all of your time is valuable here please answer this question i got......... i know i should conside...
[7 replies] Last: Thats great Aryan403, you fixed the syntax errors :) but your program... (by Jaybob66)
by Zakusa
what do i need for making a game
 
hi what do i need for making a game i have visual studio installed and i have windows form application with a script already for making a window but i cant find...
[3 replies] Last: The you mentioned above is about the Windows API. There of course is n... (by Thomas1965)
Visual studio 2015 getline
 
Trying to write a parser and I keep getting stuck on this one part. I'm using visual studio 2015 and I swear either i'm stupid or visual studio is trolling me. ...
[6 replies] Last: Well thanks for the help everyone. One step closer to finishing this p... (by CrypticA1)
Help making a tree out of asterisks
 
I was able to write a code to make a triangle that looks like this: * ** *** **** }else if(shape == 5){ cout <<"\nHeight?: "; cin >> height;...
[3 replies] Last: That code works for the pattern of the tree, but I need it to match th... (by stealthboy)
Converting string to int,operators,etc.
 
This came up while i was working on my calculator and I trying to come up with an easier way to do it. Is it possible to convert a string, entered by the user, ...
[6 replies] Last: Whoa, speech to text is a little far out there. Also Dragon is a great... (by CrypticA1)
by MaryOz
Having issues with dynamically allocated arrays and memory leaks
 
Hey everyone. I'm working on some past papers for an upcoming C++ exam. Here's an exercise where you're supposed to fill in the blanks in order to avoid memor...
[7 replies] Last: Yes and that's the answer, that you have to make sure that every new h... (by MaryOz)
Invoke a default constructor from a non-default constructor?
 
I have invoked constructors before but it was always with inheritance. Suppose I wrote the following class Animal() { public: Animal() : legs(4), hung...
[2 replies] Last: Hi, An alternate view : Just thinking that a delegating ctor is hand... (by TheIdeasMan)
by y3y1f8
Checking strings with specific format
 
I'm trying to check a command string with a specific format. Following are the allowed format: 5n-3S+16ne2w +4ne1s3n NSEW is the direction (-3w is simply 3...
[1 reply] : Line 9 : Will never be true. If commands is not a digit it couldn't ... (by tcs)
Problem With CreateThread With A Function In Class [WINAPI]
 
Hello, I have a problem with CreateThread function from WINAPI in Visual Studio 2015 Update 1, i have a class and on this class i have the function which i n...
[2 replies] Last: Thank you for your answer. Yes, my problem solved thanks to you. (by AliAssassiN)
by N8tiv
using namespace std;
 
Hello all, Definitely a newbie to C++, not to coding in general. I have very little experience with C#, but… I understand the basics of OOP; Inheritance, ...
[2 replies] Last: Good stuff, thank you… Symbols? Haven't read anything on them, or d... (by N8tiv)
by m0bb1n
program stopping loop when finding specific number
 
Hello, I was trying to make a small program that stops running when it either finds 1, 2, or 88. When I run this number, the console is spammed with numbers...
[3 replies] Last: Sure works man! And obviously it counts man. After my 1st lesson in sc... (by etrusks)
conio.h
 
Actually what is this? whenever i included this to a program, the compiler don't compile and conio.h is unknown header file. explanation please,
[5 replies] Last: I see (by GibsRey)
Need Help (Noob)
 
Thank you for your help!! I finally got it.
[3 replies] Last: WoW! That is exactly what i needed. I will go thorough and look at wha... (by curiousfloridian)
by ry23
Output File Existence Using fstream
 
My goal is to input the first line of a file into another file only if the input file exists and the output file doesn't. I have accomplished the status check o...
[4 replies] Last: See 'Action if file already exists' and 'Action if file does not exist... (by JLBorges)
help with output and functions (1,2)
 
i need help with the output because im getting most of the information but some of it doesnt make sense?i think two of my function are wrong addwater which is w...
[27 replies] Last: cool. enter width 15 enter depth 10 enter the flow rate in 20 enter ... (by Jaybob66)
---
 
---
[2 replies] Last: now you've just got rid of a lesson for someone else! ungrateful sod! (by Jaybob66)
January 2016 Pages: 1234... 29
  Archived months: [dec2015] [feb2016]

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