General C++ Programming - December 2012 (Page 3)

Which is Better
 
I have 2 pieces of code. Both are trying to do the same thing.I know they aren't finished and probably have holes in them butbasically I have to create a progra...
[1 reply] : The Details class should implement friend operator>>(istream &in, D... (by LB)
Piority Queue w/ Ternary Heap
 
Folks I am LOST. This is school related but NOT homework. Can someone please tell me what needs to be modified exactly???? Instructions and code are below: /...
[no replies]
8- and 16-bit operations convert to 32 bit and back?
 
I was flipping through a C++ slideshow on efficiency when I came across one which stated, Prefer 32-bit ints to all other sizes, because (for one reason), 8 an...
[4 replies] Last: I got curious, and hacked around with some assembly and confirmed tha... (by helios)
Freeing resources with Boost::ptr_map
 
In the following scenario, is 'T' properly freed? or will an increasing amount of 'loads' cause a memory leak? typedef boost::ptr_map<std::string, T> map_t; ...
[3 replies] Last: Alright, i think I've almost got this sorted out. I'm trying to create... (by Thumper)
Multi-field dialog box variables into telnet.exe
 
Hello everyone! I am very new to C++, and I have what I believe to be a fairly complex programming question: I want to create an email with the telnet cli...
[no replies]
cout not printing variables as they truly are or inhibiting update of memory...
 
I've never experienced this before in all my time programming c++. But this is just so wtf just look... #include <iostream> using namespace std; clas...
[4 replies] Last: ok, good to know. I typically don't modify variables as I print them w... (by NeroSega)
result is always 0
 
This program is supposed to return the BMI of an athlete. As I go through it, it gets to the calculation part and it's storing the values for height and weight ...
[6 replies] Last: both are useless, no-effect statements (by ne555)
Create an instance of object from interface from C# DLL
 
I am trying to run a function from a DLL file. That function is embedded in a series of interfaces. No classes. I can't run it in my C++/CLI. I am getting an un...
[1 reply] : That DLL is a COM server ? If so, request a interface pointer via CoCr... (by modoran)
Deleting data in Data Structures (1,2)
 
I know that with classes you have deconstructors, but is there anything I can use for data structures? EX: struct level{ double experience = 0; long ...
[20 replies] Last: So: ship.clear() does not delete anything in ship myshipname ? If... (by IWishIKnew)
by cndcnd
floating point precision
 
Hi everybody, I run a program for scientific calculation on different platforms (windows + gcc, windows + visual studio, a linux cluster with, I think, an in...
[5 replies] Last: Numeric computations on finite-precision computers are a difficult, bu... (by Cubbi)
by dugeen
How to un-inline a function defined in class?
 
I was looking through The C++ Programming Language today and I noticed it said that functions defined inside the class definition (rather than outside it and ...
[8 replies] Last: > I like to define member functions inside the class because I think i... (by JLBorges)
while loop
 
what will happen to this code? is it this code will become infinite loop? int i=2; while ( i<6); { cout << "some even : " << i << i+2 << i+4 << endl;...
[3 replies] Last: oh ic, thank you, to both of you! ^^ (by zech5443)
Delete a student at a class student
 
how i do delete a student at following class ? line 63 - 71 : #include <iostream> #include <cstring> using namespace std; class Date{ friend class ...
[no replies]
Why the range of char in c is from -128 to 127?
 
for my computer, the char type hold 8-bits. I know the first digit is for the sign, the max number in bin is 0111 1111 111 11111, I know this eauals 2^7 - 1 =...
[5 replies] Last: [quote=standard]Objects declared as characters (char) shall be large e... (by hamsterman)
by Andym
Programming Languages
 
What is the program of choice? Is it really as simple as Objective-C for apple and .net for windows? It seems to me that a program could be written in C++ and...
[1 reply] : If you want to develop in C++, Qt framework is a great choice. Qt is a... (by majidkamali1370)
help meeeeeee...ARRAY PROBLEM...
 
Hello everybody here on the forum..am having a problem and i want somebody to help me out...am writing this program which is doing my head in...this is a part o...
[5 replies] Last: i figured it out...the problem was a very simple one...r=+1 is a wrong... (by donfire)
Linked Lists, Objects and Member Functions
 
So I'm writing this simple practice program using a linked list where I create a list of employee objects which store their names, age, ect... I was able to fi...
[6 replies] Last: Cool, that did the trick! (by bickelz)
How to find largest number in array
 
Does anybody have any ideas on how to find the largest number in an array, but keep the location it's stored in? For instance, I want to find the largest number...
[3 replies] Last: It means 'p' is a pointer to a integer. You must have almost just bega... (by S G H)
Pointers to Objects
 
What is the benefit of using a pointer to a class? Speed? Flexibility?\ ex: //Parser.h class Parser { public: void load_file() { ...
[2 replies] Last: Some idioms (like PIMPL) and design patterns (Singleton, for example) ... (by TheGrayWolf)
Creating a Class variable Based on the Constructor?
 
Again, sorry for the bad title, but hopefully it'll be understandable. Basically, I'm creating a class for animation and instead of limiting myself to just usin...
[3 replies] Last: Last thing: Into "Screen" struct/class you must hold BOTH the SDL's Sc... (by S G H)
December 2012 Pages: 12345... 43
  Archived months: [nov2012] [jan2013]

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