I'm getting the error:
1>LINK : fatal error LNK1104: cannot open file 'LIBC.lib'
Here's my source code:
#include <curses.h>
int main()
{
initscr(); /* Start curses mode */
printw("Hello World !!!"); /* Print Hello World */
refresh(); /* Print it on to the real screen */
getch(); ...
Hello, I am porting a library from C++ to C#. The old library uses vectors from C++ and in the C# I am using generic Dictionaries because they're actually a good data structure for what I'm doing (each element has an ID, then I just use using TypeDictionary = Dictionary<String, Type>;). Now, in the C# code I use a loop like this one
Typ...
Possible Duplicate:
What is the performance cost of having a virtual method in a C++ class?
Is it true that interfaces slow down programs? I have heard that this is the case because during running time each during each usage of an object implementing this interface the decision has to be made which class implementing the inter...
For one of my opensource project, i need to compute decimal equivalent of given unicode character.
For example if tamil character L'அ' given, output should be 2949 .
I am using c++ in Qt environment. I googled and couldnot find a solution for this. Pls help if you know a solution for this.
...
Hello,
I have an union X. It's size is 64bits. How can I write (if possible) its declaration if I want to access those 64 bits as:
1. 4 int16_t: p,q,r,s;
2. Array of 4 int16_t: a[4]
3. 2 int32_t: n, m;
4. Array of 2 int32_t: b[2]
5. 1 int64_t z;
...
I've been developing an interpreter in C++ for my (esoteric, if you want) programming language some time now. One of the main things that I have noticed: I start with a flexible concept, and the further I code (Tokenizer->Parser->Interpreter) the less flexible the whole system gets.
For example: I didn't implement an include function at...
Hello,
I have got four classes A, B, C and D.
Class A has a member b of class
B.
Class B has a member c of class C.
A has a member D* dpointer;
This hierarchy has to be preserved (in fact this is a GUI with app, window, panel as A, B and C).
Now B and C must use a method from *dpointer.
Is there something more elegant than givin...
Very similar to this post
How can I declare template array as a parameter in templated function?
Something like this code:
template <unsigned i> void my_func (char (&a)[i]); //yes, I do need that reference
...
Hi,
I have the following simple DLL in c++ un-managed code;
extern "C" __declspec(dllexport) void ArrayMultiplier(float (*pointerArray)[3], int scalar, int length);
void ArrayMultiplier(float (*pointerArray)[3], int scalar, int length)
{
for (int i = 0 ; i < length ; length++)
{
for (int j = 0; j < 3; j++)
{
...
I'm using VS2008 to build a plain old C++ program (not C++/CLI). I have an abstract base class and a non-abstract derived class, and building this:
Base* obj;
obj = new Derived();
fails with the error "'Derived': cannot instantiate abstract class". (It may be worth noting, however, that if I hover over Base with the cursor, VS will po...
I have a C++ class representing a hierarchically organised data tree which is very large (~Gb, basically as large as I can get away with in memory). It uses an STL list to store information at each node plus iterators to other nodes. Each node has only one parent, but 0-10 children.
Abstracted, it looks something like:
struct node {
pub...
Hello everyone!
I'm new to C++ and i'm trying to use std::sort function to sort a vector of Solutions.
The code is something like this (solution list is a *vector):
void SolutionSet::sort(Comparator &comparator) {
std::sort(solutionsList_->begin(), solutionsList_->end(), &comparator::compare);
}
The comparator param is a Comparat...
I've used boost::gregorian::date a bit now.
I can see that there are the related months & years & weeks duration types.
I can see how to use known durations to advance a given date.
Qu: But how can I get the difference between two dates in months (or years or weeks) ?
I was hoping to find a function like:
template<typename DURATION>
...
Hello,
I'm writing transpose function for 8x16bit vectors with SSE2 intrinsics. Since there are 8 arguments for that function (a matrix of 8x8x16bit size), I can't do anything but pass them by reference. Will that be optimized by the compiler (I mean, will these __m128i objects be passed in registers instead of stack)?
Code snippet:
i...
Once a minute I want to run a task, not blocking other GUI functions. I heared somthing about QConcurent::run ...
Or should I use signals and slots?
...
+Hi...
i am a newbie ... and i don't know how to include external libraries in c++.
This is sooo hard.
I want to use TinyXML.
so i made this :
example2.cpp
#include <iostream>
#include "tinyxml.h"
void write_app_settings_doc( )
{
TiXmlDocument doc;
TiXmlElement* msg;
TiXmlDeclaration* decl = new TiXmlDeclaration( "...
Hello all,
I have a problem which is either something I have completely failed to understand, or very strange. It's probably the first one, but I have spent the whole afternoon googling with no success, so here goes...
I have a class called Schedule, which has as a member a vector of Room. However, when I compile using cmake, or even b...
I'm trying to complete an exercise to write a program that takes the following command line arguments: an input file, an output file, and an unspecified number of words. The program is to read the contents of the input file line by line, find for each word given which lines contain the word, and print the lines with their line number to ...
I tried to find out that gd means in boost library name and I only found two other people looking for the same thing.
I suppose it should be a place where this is clearly documented and I would like to find it.
mt - multitheaded, get it with bjam threading=multi
s - bjam runtime-link=static
g - using debug versions of the standard and...
Possible Duplicate:
Why would you ever want to allocate memory on the heap rather than the stack?
Test2 *t2 = new Test2();
t2->test();
Test2 t3;
t3.test();
Why would I want to create a pointer object of type Test2? Why not just do non pointer version of Test2? Why would I want to do pointer objects?
Found answer here:
Wh...