General C++ Programming - June 2014 (Page 19)

debugging
 
// Debug 6-1 // function counts down from higher number to lower number entered // e.g., if numbers entered are 4 and 8 // output is: 8 7 6 5 4 what is my mis...
[1 reply] : on line 24: x = lowest should be x >= lowest // Note: > ... (by coder777)
Linked List ADT / Return and-or increment an objects member
 
Algorithmically / Pesudo What I would like to accomplish is. -> Add and object -> If list is not empty then. -> CheckSum the Name of New Object (retu...
[no replies]
std::cin.get() looping text?
 
How do I fix that proplom and heres my code #include <stdlib.h> #include <stdio.h> #include <windows.h> #include <iostream> int main() { //Con...
[1 reply] : It would help if you told us what you were trying to do. Anyways, inst... (by giblit)
SENTEINAL as char in a C++ code
 
I have a program that is to calculate the mean for a class into two parts , when is above 70 and the second is below 70. I want to use SENTINEL to finish the p...
[3 replies] Last: No. I am saying that if you enter "10 20 n" . your program will threa... (by MiiNiPaa)
Random Response Generator
 
Hey guys. I'm new to C++, and looking for some help. I'm trying to use a random response generator. I found a ton of information on this site, and I'm running a...
[4 replies] Last: That makes perfect sense. Also, it worked in the program. Thank you so... (by cavendert)
SoundFont 2.04 specification question?
 
Is it possible for a preset to exist without any instrument, or an instrument which is linked to a preset to exist without any samples? I notice that they're...
[no replies]
Reading lines from a text file
 
Hello. I am trying to read lines from a .txt file like this: // "file.txt" This is the first line. This is the second line. To do this, I tried using...
[1 reply] : I don't see the need for a stringstream there. Simplify: int main() {... (by Chervil)
Set std::chrono::time_point<> time
 
How do you set time for an instance of std::chrono::time_point<> ? For example: 6 pm tomorrow. I just wanna get the time from now til then. Thanks in advance....
[1 reply] : chrono library doesn't have a concept of a calendar day. You can take ... (by Cubbi)
segmentation fault(core dumped)
 
Below program got compiled properly, but while execution, throws "segmentation fault error. pls help. urgent!!! #include <cstdio> #include <iostream> //#in...
[8 replies] Last: ********************************************************************... (by Computergeek01)
Help FTP update MFC
 
hello, i'm a beginner MFC and I've currently been scripting a C++ dialog-based FTP Uploader using MFC, following http://www.cpp-home.com/tutorials/256_1.htm but...
[3 replies] Last: Which version of visual studio do you use? Did you create the right ty... (by coder777)
by Bizzle
animation ascii art с++
 
Hello! There was one problem I've got a header file and cpp file. The header file contains the ascii art. image.h //Images.h #ifndef IMAGES_H_INCLUDED #de...
[5 replies] Last: a) you dont need stdio.h b) if you did need it i would use cstdio c) y... (by Little Bobby Tables)
Problems with const
 
Hello I have written some code and I wanted to avoid that the parameters are getting copied every time the function gets called because that operation is quite ...
[6 replies] Last: that's right, I must have misread it. However, ¿where do you set the ... (by ne555)
Checking if a floating point value is within a certain range
 
Suppose I wanted to check if a given floating point value is within a certain range. What would be Your recommended approach when considering simplicity, speed,...
[7 replies] Last: That's only if you test for equality, i.e. == and !=. That is why chec... (by Daleth)
[SFML][Vector] Problem with Polar and Cartesian Coordinates convertion
 
In a testing SFML project of mine, I've made 3 sf::CircleShape 's: a big one, 2 small ones. The 2 small ones are supposed to be moving slowly around the center...
[2 replies] Last: I #include d math.h but the compiler is complaining identifier 'M_... (by dleanjeanz)
cin >> nuances
 
I'm looking at a program written in a professionally published book: #include <iostream> using namespace std; int main() { char ch; int count = 0; ...
[3 replies] Last: Both of your answers are very unique but congruent with the same idea ... (by Aaron Vienneau)
Strange compiler behaviour
 
Today I experienced a very strange compiler issue. I started the compilation and it outputted that a member object of a class was undefined. After about 4 hours...
[3 replies] Last: You are totally right! Making CInGameManager a pointer has solved the ... (by alastairl)
Why doesn't my overloading operator activate??
 
#include<iostream> using namespace std; class Try{ public: Try(int); Try(const Try &pich); Try& operator=(const Try &pich); int a; ...
[4 replies] Last: Thank you SO VERY MUCH!!!! :))) (by stefoka)
Sudoku Solver (Brutish way)
 
Hi guys! I wrote a program in C++ to solve Sodoku. I just cant figure whats wrong with it....... I've written //comments everywhere for understanding the co...
[2 replies] Last: I think you need to set count1=0 before line 284. Otherwise each time... (by dhayden)
Error in a vector
 
Hi!I am writing a c++ program which uses a vector which contains rows and columns of a table.Unfortunately I got the following error: IntelliSense: no instan...
[1 reply] : void setCell(const CCellDescr& cell_Data) { m_Data.push_back( cel... (by AbstractionAnon)
Can someone explain this code
 
#include<iostream> using namespace std; class String { public: int num; String(); String(int); String(const String& str); ~String(); ...
[4 replies] Last: The class has bugs. The constructor at line 38 doesn't initialize arr... (by dhayden)
June 2014 Pages: 1... 1718192021
  Archived months: [may2014] [jul2014]

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