General C++ Programming - August 2010 (Page 15)

Are class operators more efficient than class functions?
 
There seems no significant difference in the listing between these two expressions: ;x_class=y_v...
[1 reply] : they're the same, performance wise. Overloading operators just make... (by Disch)
does the or( || ) operator use short circuit evaluation?
 
just like the and( && ) operator?
[3 replies] Last: && and || operator uses short circut evaluation and in C++ we should a... (by rahulroot)
how to use explicit correctly?
 
Hi I'm trying to use explicit to prevent implicit conversions from one integral type to another ...
[5 replies] Last: explicit keywords used to avoid implicit conversion from constructor a... (by rahulroot)
by memecs
typedef and size_t
 
Hello, I don't understand why this doesn't compile. It returns an error saying that max(long unsi...
[6 replies] Last: Well, here _SIZE_T is just renamed with typedef directive to avoid ... (by EverBeginner)
by majia1
matrix new and delete / memory leak
 
Hi, There is a memory leak problem in my code, and I could not find where it is. The only place I...
[18 replies] Last: Line no 21 has problem,its writing beyond boundry error.it must be ... (by rahulroot)
by Tiigon
Global variable doesn't work
 
I tried to create a global boolean to use in two different source files. This is the header file,...
[4 replies] Last: are you including your header file in another source file. Note: In... (by rahulroot)
Searching method
 
Hi I wanted to create a C++ program.Using constructor and proper methods design a class graphics...
[5 replies] Last: Sorry mate, I can't give you the entire program... for 2 reasons: 1. I... (by steve lorimer)
Multi-File Woes
 
I want two classes defined in two files to have members of each other however my compiler isn't lett...
[6 replies] Last: +1 m4ster r0shi Both .cpp files should be including both headers. ... (by Disch)
by RyRy
Can't get User Input with XOR encryption?
 
#include <iostream> #include <string> #include <fstream> #include <cstdlib> #include <cstring> ...
[10 replies] Last: [quote=RyRy]I get the same binary as their answer. Well that site do... (by Galik)
by majia1
memory leak detect using _CrtDumpMemoryLeaks
 
I am trying to detect memory leak using _CrtDumpMemoryLeaks in Visual Studio 2008. The problem is th...
[8 replies] Last: ops, sorry, I made a stupid mistake... Thanks guys! (by majia1)
by jzone3
Quadratic Formula
 
I made a quadratic formula calculator in xcode, but it says "invalid suffix on integer constant" Ple...
[4 replies] Last: well i figured it out myself. thanks anyway (by jzone3)
Software Questions
 
Okay, I have two extremely vague questions: 1) I was wondering how to make it so one program can de...
[5 replies] Last: This here might help too -> http://www.drdobbs.com/cpp/204202899 (by m4ster r0shi)
by RyRy
Problem with some characters.
 
#include <iostream> using namespace std; int main() { string str; cout << "Input:"...
[6 replies] Last: I've been advised to not use system calls such as system("Pause"). I ... (by RyRy)
by LJones
public class member modifies private member via pointer, runtime crash
 
I've stripped it down to short files illustrating the issue (I was actually hoping to find the issue...
[4 replies] Last: Looking at this now, I truly have no idea what I was thinking. Thanks ... (by LJones)
SFML with Visual C++
 
I have never used Visual C++ much but I am trying to get SFML to work with it. I copy/pasted the ...
[2 replies] Last: Alright I guess I'll just place it in the same directory. (by AdventWolf)
MFC
 
I am working from a code example i found but it uses the following function from the mfc - WCHAR s...
[2 replies] Last: It looks like it's just copying the string in sn to serial. (by helios)
by jhen
2dimension array
 
im a begginer with this kind of program can you help me how to use the 2d array in c++...because i d...
[8 replies] Last: you know what thanks for that info now i know it....thanks guys!!! ... (by jhen)
by declan
Is it possible to call this operator with a pointer?
 
Hey guys. I have an operator defined for a matrix class, so I can do int someInt = myMatObj(1,4,...
[7 replies] Last: myPtr -> operator() (1,4,5) how about (*myPtr)(1, 4, 5) ?..... (by hamsterman)
Linked List error!
 
Hi, I have the following code which compiles fine but does not produce any output.. using name...
[1 reply] : The problem is that p keep pointing to NULL. Try this //void append(... (by ne555)
Hash_map
 
Hello everyone. I have been trying to make hash using hash_map. The problem is that I have to inse...
[2 replies] Last: I'm no expert, but 2 things spring to mind. If you are attempting t... (by steve lorimer)
August 2010 Pages: 1... 1314151617... 20
  Archived months: [jul2010] [sep2010]

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