General C++ Programming - June 2010 (Page 7)

grapg representation
 
i want to write the code for the grapg with n nodes and m arcs that every arc have 3 component:x for flow, u for capaciti and w for price and every node have 2 ...
[no replies]
How do recompile source files of a precompiled headers?
 
Hi, I am making a mod using a program called Source SDK with Visual Studio 2008 Professional Edition on Windows XP. With the code package comes precompiled hea...
[no replies]
what's wrong
 
what is wrong with this: #include<dos.h> #include<process.h> #include<string.h> // for various functions of strings like gets or puts #include<fstream.h...
[5 replies] Last: What's your Compiler? (by eryar)
by kcgb20
Map with an array as the value type?
 
Basically, I need to know if I can have a one-dimensional array as a value type in a map. Here's some basic code that kind of resembles what I'm doing: #inc...
[7 replies] Last: Got it working properly... code ended up looking -completely- differen... (by kcgb20)
STL containers as base classes
 
I know one is not supposed to derive from STL containers because they have non-virtual destructors. but that is boring. I've noticed that boost::shared_...
[12 replies] Last: You took the words right out of my mouth :) Actually, if you ask a ... (by jsmith)
ofstream
 
I read two files. Then I try to combine them and write this in another file. but when I try to write the file, i check if the file is open. I always end up the...
[1 reply] : bipFile.open("c: \ \text.txt"); (by kbw)
by declan
Is/How is the heap organized?
 
Hey everyone! So I'm wondering something about the heap. My book (a crappy one) defines it as "a huge, amorphous block of memory". If you allocate an array o...
[7 replies] Last: That's correct. http://en.wikipedia.org/wiki/Virtual_memory (by R0mai)
Create a class which can not be inherited
 
Hi, Could we write any class which can not be inherited
[17 replies] Last: It surprises me this link hasn't came up yet. http://www.parashift.co... (by R0mai)
std:: not required?
 
This surprised me: std:: namespace qualifier doesn't seem to be required when using std::algorithms, such as for_each. Example code below. Notes: 1. ...
[5 replies] Last: Thanks, R0mai. ADL explains why the C-string version has to be qualif... (by pdbarnes)
by Bezi
weird Segmentation fault
 
I have this piece of code which works fine #include <cstdio> #include <iostream> #include <cmath> #include <gsl/gsl_randist.h> #include <gsl/gsl_cdf...
[10 replies] Last: But then I can use double * z = new double ; // .... delete... (by Bezi)
Face detection program bug
 
Hi guys, I'm currently trying to produce a facial detection application, but I seem to have some problems. My program, is able to recognise multiple users, and ...
[5 replies] Last: I dont know anything about MFC, so I wont be able to help in any way f... (by mgupta)
How are sets ordered
 
In the section on "set",it is written that "Internally, the elements in a set are always sorted from lower to higher following a specific strict weak ordering c...
[4 replies] Last: Okay thanks! (by souptik)
Precision Numeric in C++
 
Hi. I'm trying to verify which is the numerical presicion of my computer... my code: #include <iostream> #include <iomanip> using namespace std; ...
[6 replies] Last: "Infinite" means "unbounded". Computers are physically incapable of ha... (by helios)
by jli1
Portaudio MP3 Decoding?
 
I'm working on a project that (currently) is used for decoding and playing MP3 files. I'm using Portaudio for the sound card interface, and libmad for the decod...
[no replies]
Pratical use of link list
 
Hi, Could anyone proivde me some pratical scenario in code where we need to use link list.
[17 replies] Last: great & thanks a lot jsmith (by agoswami)
which inline-s are useless?
 
Which inline-s are useless, presuming, that all functions actually must be inlined? Where is an inline missing? (put in a header file, these all worked for me...
[12 replies] Last: I think, there are no specific rules put forward by C++ standard when ... (by athachil)
are std::strings magic?
 
I was experimenting tonight with containers. simply reading word by word a copy of don quixote into a container, e.g: vector<string> and then dumping it all...
[8 replies] Last: 1 for allocating a new node in set's internal data structure; 1 for ... (by helios)
how to make a calculator in c++ console application
 
howhow to make a calculator in c++ console application to make a calculator in c++ console application
[3 replies] Last: An easy way is writing a recursive descent parser Hint: there's an ex... (by Bazzy)
by everid
pointer-to-member function question
 
#include <iostream> class test { public: test(int i){ m_i=i;} test(){}; void hello() { std::cout<<"hello()"<<std::endl; } private: int m_i; }; ...
[3 replies] Last: why even with NULL pointer, we can still call the function correctly?... (by Disch)
A small thought on the Basics Again
 
I was thinking about the following code char *argv = { "Karthick", "88"}; so whats happening here. ?? Now to get you all clear of what my ...
[3 replies] Last: Oh ok.. Thanks Smith :) (by karthick88)
June 2010 Pages: 1... 56789... 18
  Archived months: [may2010] [jul2010]

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