Source: http://projecteuler.net/index.php?section=problems&id=11
Quick overview: Take a 20x20 grid of numbers and compute the largest product of 4 pairs of numbers in either horizontal, vertical, or diagonal.
My current approach is to divide the 20x20 grid up into single rows and single columns and go from there with a much more m...
How to do processing on hindi text using c++ in linux any suggestions.
I want to read a hindi text from file encoded in UTF-8 and process it that is to find a
specific word from that . How can we do it??
...
Hi All.. I use this method to compile C++ file in VS. But even i provide the correct file it returns false. Can any one help me...
This is class called CL
class CL
{
private const string clexe = @"cl.exe";
private const string exe = "Test.exe", file = "test.cpp";
private string args;
public CL(String[] args)
{
...
Dear All,
I've a problem with this pattern under c++ on VS 2008.
The same code has been tested in gcc (linux, mac and mingw for
widnows) and it works.
I copy/paste the code here:
class MyCommand {
public:
virtual void execute() = 0;
virtual ~MyCommand () {};
};
class MyOperation {
public:
virtual void DoIt() {}; //I also...
Hi,
I want to const declare the this pointer received as an argument.
static void Class::func(const OtherClass *otherClass)
{
// use otherClass pointer to read, but not write to it.
}
It is being called like this:
void OtherClass::func()
{
Class::func(this);
}
This does not compile nad if i dont const declare the OtherCla...
I have this snippet of the code:
header
class A {
private:
int player;
public:
A(int initPlayer = 0);
A(const A&);
A& operator=(const A&);
~A();
void foo() const;
friend A& operator=(A& i, const A& member);
};
operator=
A& operator=(A& i, const A& member){
i(member.player);
return i;
}
and I have...
Hi, I'm studying C++ from Schildt's book and don't quite understand what does he mean under third structure; Can somebody explain this ->
To access a specific structure within
an array of structures, you must index
the structure name. For example, to
display the on_hand member of the
third structure, you would write
cout <...
I am trying to refactor a working code. The code basically derives an interface class into a working implementation, and I want to use this implementation outside the original project as a standalone class.
However, I do not want to create a fork, and I want the original project to be able to take out their implementation, and use mine....
Hi,
I have created a menu bar and some menus with Qt creator. One of the menus had to be coded to use QActionGroup features. Now it is easy to add my custom menu to the menu bar with:
printMenu = menuBar()->addMenu(tr("&Print"));
but my menu will be in the last position of the menu bar. How do I add my menu at a specified place? (e.g....
Hello,
I'm developing an Activex controller for IE7.
I want to check version of flash+svg and install it if missing or old, and also change some settings in IE like setting up the printer to use landscape format..
I'm completly new to activex, so i'm trying to figure out how to do it, can you please post some pointers ? is what i'm tr...
Possible Duplicate:
it about hindi text proccessing in in linux using c++
A file contains hindi text. I want to read this file and perform some operations on text it contains. So, if anyone could please explain how to read it from file and handle it(or just print it).
Ex: if file contains
मै एक भारतीय हूँ।
then my program s...
I have a class with a private vector of doubles.
To access or modify these values, at first I used methods such as
void classA::pushVector(double i)
{
this->vector.push_back(i);
}
double classA::getVector(int i)
{
return vector[i];
}
This worked for a while until I found I would have to overload a lot of operators for what I needed, s...
Hi guys,
I've got problem with my little C program. Maybe you could help me.
char* shiftujVzorku(char* text, char* pattern, int offset){
char* pom = text;
int size = 0;
int index = 0;
while(*(text + size) != '\0'){
size++;
}
while(*(pom + index) != '\0'){
if(overVzorku(pom + index, pattern)){
...
I have this piece of code where a server socket is created and is set to listen on a particular port number say 5005. Now once the accept socket function returns the socket that gets created is copied into the m_Socket variable and finally i shutdown the server socket named SocServer which was created locally.
Now my question
Is it poss...
I have downloaded pdcurses source and was able to successfully include curses.h in my project, linked the pre-compiled library and all good.
After few hours of trying out the library, I saw the tuidemo.c in the demos folder, compiled it into an executable and brilliant! exactly what I needed for my project.
Now the problem is that it'...
It's calling these API functions (advapi32.dll) with these parameters:
CryptCreateHash ( 3275488, 32771, 0, 0, 1243424 );
CryptHashData ( 3203040, 'UY30930037661', 13, 0 );
CryptCreateHash ( 3276304, 32771, 0, 0, 46463812 );
CryptHashData ( 3203296, '-585164138661', 10, 0 );
CryptCreateHash ( 3276304, 32771, 0, 0, 46463808 );
CryptH...
Can somebody tell me what precisely
operator std::string()
stands for?
Thanks in advance!
...
#include<wchar.h>
#include<iostream>
using namespace std;
int main(int argc,char* argv[])
{
fputws(L"मै एक भारतीय हूँ।",stdout);
return 0;
}
?? ?? ?????? ??? is displayed when i run it on ubuntu
can anybody help me out?
...
I have this code:
header - test.h
Inside header I have some class A and definitions of two functions quiz and quiz2
void quiz(int i);
void quiz2(A a, A const *pa);
I call function quiz2 from quiz
A a1(i);
A *pa1 = new A(a1);
quiz2(a1, pa1);
this is implementation of the function:
void quiz2(A a, A const *pa){
int i = ...
global destructor keyed to (commands.cpp)
undefined reference to boost::system::get_system_category()
How to resolve this error?
...