Hi,
I googled for free and complete computer science tutorials or books, but they are not in c++.
Please send here any tutorial or book about computer science in C++. And also if there is a very useful non-free book please list it here.
Thank you,
Mohammad
...
Could you please explain, how linking with -l option against .la files works?
As far as my experience reaches - i have only linked against static library (.a) files.
Now i took a look at some Qt generated Makefiles and cant figure out, how linker figures out to use/open libQtCore.la file, when -l QtCore switch is specified, instead of ...
For Example:
If I need to read a multiple line input like(and I dont know How many lines would be there!!):
1 20
2 31
3 41
I am using something like
int main()
{
string line;
while(getline(cin,line) != NULL)
{
// some code
// some code
}
}
Now the program never stops- i.e always it expects some inpu...
I'm trying to figure out how to do the equivalent of an IPV4 broadcast using IPV6.
I'm creating a non-blocking IPV6 UDP socket.
From the side broadcasting i'm literally just doing a sendto "FF02::1" on port 12346.
On the listen side I discovered I need to join the group so I did the following:
ipv6_mreq membership;
memset( ...
Can I have managed code within native code?
...
I have some technical question, I have repeating code in my work, and I want to get rid of it, so I know that in C++ it is not good idea to use macro, but instead I must use inline function, is it good idea to use this function as inline:
list<Data>::iterator foo(int data){
if(dataExists(data)){
list<Data>::iterator i;
for(i = d...
As in stl containers, why can't we access a typedef inside the class from the class instance? Is there a particular insight into this?
When value_type was a template parameter it could help making more general code if there wasn't the need to specify the template parameters as in vector::value_type
Example:
class T {
public:
typ...
i have 3 classes A,B and C. C is derived from A and B. i get pointer to pointer of class C and cast to A** , and B ** , the variable that hold the the B** has the address of A** in my example B ** BdoublePtr hold the address of A** .i am using the following code
#include "conio.h"
#include "stdio.h"
#include "string.h"
class A
{
publi...
My question is rather simple, but I am stuck. How can I choose the desired constructor from base class?
// node.h
#ifndef NODE_H
#define NODE_H
#include <vector>
// definition of an exception-class
class WrongBoundsException
{
};
class Node
{
public:
...
Node(double, double, std::vector<double>&) throw (WrongBoun...
Hi all,
I'm trying to port a MacOSX app to windows and I've come up against a problem around getifaddrs. Basically windows does not support it. I'm trying to figure a way to re-implement it (for AF_INET and AF_INET6) but the "equivalent" functionality on windows appears to be nothing like the MacOSX support.
Has someone done this sor...
Im trying to make a small app in c++ that saves midifiles with this library.
http://musicnote.sourceforge.net/docs/html/index.html
The sample code that is given on the homepage looks like this.
#include "MusicNoteLib.h"
void main()
{
MusicNoteLib::Player player; // Create the Player Object
player.Play("C D E F ...
This piece of code is supposed to calculate an approximation to e (i.e. the mathematical constant ~ 2.71828183) at compile-time, using the following approach;
e1 = 2 / 1
e2 = (2 * 2 + 1) / (2 * 1) = 5 / 2 = 2.5
e3 = (3 * 5 + 1) / (3 * 2) = 16 / 6 ~ 2.67
e4 = (4 * 16 + 1) / (4 * 6) = 65 / 24 ~ 2.708
...
e(i) = (e(i-1).numer * i + 1) /...
I want to hook new and delete operators. But I am unable to locate the original DLLs where these operators reside. I used msvcr90.dll, msvsr90d.dll, msvcrt.dll, kernal32.dll, ole32.dll and some more dlls as well. But my spying application is unable to locate new and delete operators.
Kindly if someone could tell me in which DLL new and ...
I'm looking for a tool (preferably, a Visual Studio plugin) that would display all files included by a given file and show all files included by those files and so on.
...
I am from a Java background and is learning C++. I encountered the following C++ code:
String source = String::New("'Hello' + ', World'");
As what I understand so far, this should be a call to static member function 'New' of class 'String'. But, I've searched through the whole header file defining 'String', there is not any static me...
I want to convert a mXn IplImage into a (m*n) x 1 1D vector..can this be done with any function in opencv..?
any help is greatly appreciated
...
The following problem is in 2D, so some simplifications can be made when suggesting answers.
I need to create closed areas (defined either by line segments or just set of points - convex polygon) from a set of points/line segments.
Basically I used Voronoi to generate "roads". Then I changed some of the data. Now I need a way to loop t...
Friends
I have the following class that
class Singleton
{
private:
static Singleton *p_inst;
Singleton();
public:
static Singleton * instance()
{
if (!p_inst)
{
p_inst = new Singleton();
}
return p_inst;
}
};
Please do elaborate on precautions taken while implementing Sing...
Hello, I have a templated class with a static value, like this:
template <class TYPE>
class A{
static TYPE value;
};
in the code of a dll I assign the static value:
code of DLL_1
A<float>::value = 2.0;
I wish the value to be shared by all the dlls I'm using, i.e. I want that:
code of DLL_2
printf("value on DLL_2 %f",A<flo...
Note: This was an interview question and may not have an actual use case currently
The question was to design a class that can store numbers which are very very large say each number can have 100 digits. This new class is a datatype like int.
What are the different types of constructors, overloads and other functions that you would wri...