General C++ Programming - August 2013 (Page 20)

Why is this code error prone
 
This code i came while reading Stroustrop website. Couldn't understand why he mentioned this code as error prone! http://www.stroustrup.com/bs_faq2.html#de...
[3 replies] Last: This code is error prone compared with smart pointers. It does not gua... (by vlad from moscow)
Quine Program
 
I read about quines on Wikipedia and thought they were kind of interesting. I made a program and I wanted to know if it is considered a quine. #include <fst...
[5 replies] Last: With the advent of raw string literals, it's easy to write quite reada... (by JLBorges)
by simons
Static const datatype question for Fraction class
 
Hi, My Fraction.h class looks like : class Fraction { int num; unsigned int den; public: Fraction(int = 1,int =1); //Constants of Data...
[6 replies] Last: > Why in the implementation 'const Fraction::Fraction sc_fUnity(1,1);'... (by JLBorges)
Wrong Output
 
#include<fstream.h> #include<conio.h> #include<stdio.h> #include<string.h> class ACCOUNT { private: int Acno; char Name ; float Balance; public: void I...
[17 replies] Last: That is, the transact function is never able to execute the the state... (by cire)
all combination question
 
Hello all for example let say there is vector [1,2,3,4,5,6,7,8,9] and let say there is int n if i say n=3 I want to find all possible 3 combination [1...
[4 replies] Last: Thanks is visual studio 2012 support c++11? (by codeback99)
Boost read_xml error
 
This code compiles with VS2012/13 but fails with GCC 4.8 #include <boost/property_tree/ptree.hpp> #include <boost/property_tree/xml_parser.hpp> using boost::p...
[no replies]
by Snaksa
Time and memory
 
Hi guys! I want to ask you how can I understand the time that my program needs to finish and how can I see how much memory it uses? Because in some exercise is ...
[4 replies] Last: You can use the Windows Performance Monitor to monitor what resources ... (by kbw)
Gui Plugins
 
I am currently restructuring my plugin architecture for plugins that are displayed on toolbars and menus (this is a small portion of the plugins). The idea is ...
[no replies]
Numeric Conversions
 
Hey can anyone help with a statement or sub function that can help me convert a decimal number to a binary number... I can't seem to figure out how to perform t...
[4 replies] Last: Thanks a million... My complete program should be able to convert anyt... (by nutty craze)
How do i go about printing the "info" value of the "Body", [ cout<<Body->info;] is giving me a weird value
 
// First_VB_Prog.cpp : Defines the entry point for the console application. // #include <iostream> using namespace std; //Simple Linked List composin...
[3 replies] Last: The number after my nick means how many posts i've written up until th... (by S G H)
What is the error in the program?
 
1)Define a function Intext(), to create a text file named Story.txt, which should contain text lines entered by the user. Define another function Outtext , to ...
[11 replies] Last: remove the second while loop. it grabs the first line, tests for the T... (by closed account Dy7SLyTq)
Abstract Factory Design Pattern.
 
I've been reading Design Patterns: Elements of Reusable Object-Oriented Software and their example is really confusing me. From what I understand, this de...
[8 replies] Last: So if there is no actual abstract classes, what does abstract even me... (by andywestken)
by xhxh00
Question about my project.
 
I was told to check if my booking time to and from are taken. So how do i check it? i was told to use if(condition) , but i do not know what to put inside the...
[6 replies] Last: Sorry,I'm a bit newbie to C++ programming. Hope you would understand m... (by xhxh00)
declaring pointers vs regular variables
 
I really do not see the difference between these two declarations: int myvariable; int * mypointer; It is said that when you define a pointer, inste...
[6 replies] Last: In general, do not use a pointer unless you know that you can't do wit... (by JLBorges)
define a vector in a class? and put this class in another vector?
 
First this is my code: #include <iostream> #include <vector> #include <cstdlib> using namespace std; class pore_t { int T ; }; class throat_t ...
[3 replies] Last: Thanks!!! (by northfly)
by t3st3r
The breakpoint will not currently be hit. No symbols have been loaded for this document.
 
Hello, I got a project with several DLLs. In several classes the breakpoints say that they can't be reached because no symbols have been loaded. Visual Stud...
[2 replies] Last: How can I make the project run into the breakpoints? As you're trying... (by kbw)
How to make a private member accesible outside the class?
 
The question says that: Define a class ACCOUNT with the follwing members: Private Members: Acno of type int Name of type char array s...
[11 replies] Last: @OP Instantiate ONE ACCOUNT object in your main function and call all... (by mutexe)
String math
 
I am creating a calculator program to learn more about C++, What I need to do is, I need this string number to spit out it's number, And modifier to spit out it...
[10 replies] Last: It converts a single int, after checking that it contains only digit... (by Duthomhas)
How to set certain bits of unsigned short
 
Hey, I have a double variable and depending on certain conditions I need to set certain bits of an unsigned short Variable. For example, if double var is odd I...
[4 replies] Last: Thanks so much!! Fully understand. (by tnjgraham)
Why doesnt "listt.addHead()->link->info" this section of code print out the "info" value of the Body Node of which is :2?
 
// First_VB_Prog.cpp : Defines the entry point for the console application. // #include <iostream> using namespace std; //Simple Linked List composin...
[2 replies] Last: Thanks, after Removing the function the code works, but i heard its ba... (by Ozwurld)
August 2013 Pages: 1... 1819202122... 28
  Archived months: [jul2013] [sep2013]

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