General C++ Programming - August 2015 (Page 9)

[OOP]{POLYNOMIAL} need help PLEASE!! :/
 
Hi guys so i'm currently working on something and i need help some help. after i wrote this program at first it worked normally but giving me garbage value whic...
[1 reply] : Guys!! nevermind it got solved anyways here is the changes i have done... (by MRmoe93)
by Nootor
Can someone help me run this code
 
#include <iostream> #include <fstream> #include <stdlib.h> using namespace std; class Triangle { public: Triangle(); ~Triangle(); flo...
[no replies]
by Leroi
Learning steps
 
Hi all, im trying to study c++(my first language) from the book "C++ Primer" ,i started it well, the problem is that i've already read about 400 pages and now i...
[1 reply] : I read the same book(C++ Primer 5th ed) to learn c++ which was my firs... (by ChajusSaib)
by A A A
Hangman
 
Need reviews on the following hangman code: #include <iostream> #include <windows.h> //for clear screen function system("CLS") #include <string> #include <c...
[1 reply] : PLEASE USE CODE TAGS (the <> formatting button) when posting code. It ... (by AbstractionAnon)
Const reference (1,2)
 
Is const reference like class ... int _kappa; ... int const& kappa = _kappa; ... somehow optimized by compiler? I would like it to not create any actual refer...
[27 replies] Last: Ty! Trying it. (by Krogoth)
UTF-32 to UTF-8 range_error
 
Demonstration // Example program // Prints a UTF-8 string to stdout // Fails miserably on non-BMP characters (throws std::range_error)! #include <ciso6...
[2 replies] Last: Er, I figured it out: I can't type. U+1F1800 is not a valid Unicode c... (by Duthomhas)
How to make getline () read only what the user typed into the console after the getline () execution?
 
Hey. I've got a LOT of problems today... I hope this one is the last one. In SOME tests of my new program when I must type in some text using getline () it does...
[1 reply] : Is there a way to make sure getline () WON'T read anything before it'... (by MiiNiPaa)
c++ database GUI
 
I'm making a database project using c++ oop on visual studi 2012 need some good GUI suggestions
[2 replies] Last: Visual Studio allready has a GUI designer as far as i know (by Gamer2015)
calculation problem!sometimes does wrong and absurb calculations
 
i'm just a beginner here..so forgive me if i make some mistakes ><!here's the problem,sometimes during compiling,i input a correct number but the sub total outp...
[4 replies] Last: thanks so much!!it is working fine now!i could'nt see the problem unti... (by cleontangy)
getch () and getline () problems.
 
Hi. I'm writing a program that includes a Y/N choice (yes/no) and reading a text WITH SPACES directly after the choice is made. #include <stdio.h> char...
[2 replies] Last: WOW. thank you very much! this solved both problems... and this was in... (by Maurycy5)
Stack
 
I have a very simple implementation of stack in c: #define MAXVAL 100 /* maximum depth of val stack */ int sp = 0; /* next free stack positi...
[13 replies] Last: So you finaly noticed it. Look what you have: Before swap: 4 8 9 ... (by MiiNiPaa)
A single post for Const
 
Can someone point me to a single post that goes over all the uses of Const? As they are used with functions, classes, pointers, function parameters, class memb...
[1 reply] : See: http://www.cprogramming.com/tutorial/const_correctness.html (by coder777)
Fill an array with nonrepeating numbers, randomly generated
 
I'm trying figure out how to use a random number generator to fill an array with numbers none of which is repeated. For this, I've been doing small-scale test-t...
[1 reply] : This might be useful to read: http://www.cplusplus.com/faq/beginners/r... (by Zhuge)
Sort() function problem
 
Problem : --->I cannot sort the records in the file CONSUMER.DAT --->Help me with this part of code void sort() { BILL a; int x ; int *p=...
[4 replies] Last: in line 45: while(fin.read((char*)&a,sizeof(a))) when that loop ends... (by ne555)
by AcarX
Reading binary file with fstream
 
Hi there so here's code: std::streampos fsize = 0; fsize = f.tellg(); f.seekg(0, 2); DWORD pDataLength = f.tellg() - fsize; f.seekg(0, 0); BYTE * data ...
[7 replies] Last: I'm partially right, partially wrong. Even the code is mostly understa... (by AcarX)
Stack implementation using array but in switch case there is error
 
while(1) { printf("Select and enter your choice:\n"); printf("(1)PUSH\n"); printf("(2)POP\n"); printf("(3)Display\n"); scanf("%d",&ch); swit...
[1 reply] : Please use code tags and format your code (by SamuelAdams)
by umar33
Plz Helpppppppp
 
As a child, did you ever play the game " One potato, two potato,..." to determine who would be "it"? A child is pointed to during each phrase. There are four ...
[1 reply] : You didn't ask a question (by SamuelAdams)
by helios
Request: code review
 
I need to implement this function over unbounded integers using bounded integers: f(n) = n >= 0 ? n * 2 : n * -2 + 1 Please review my implementation. In parti...
[2 replies] Last: Great. Thanks! (by helios)
How to debug invalid pointer operation
 
I am developing a Windows application using Borland C++ Builder 6, to run on a Windows 7 pc and I am seeing an 'invalid pointer operation' error when the progra...
[4 replies] Last: I'm not sure. It must be called by the line:- Application->Terminate()... (by mlesniak)
Printing long double data
 
How can i print long double data type in c..Here %llf or %Lf is not working in my code?
[3 replies] Last: Which compiler do you use? I remember that Microsoft one lacked proper... (by MiiNiPaa)
August 2015 Pages: 1... 7891011... 17
  Archived months: [jul2015] [sep2015]

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