Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
15% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
5
Posts with Downvotes
4
Downvoting Members
4
0 Endorsements
~16.3K People Reached

65 Posted Topics

Member Avatar for merse

Is it possible to run to run photorec such a way not to recover all photos on a drive just those with specific EXIF data? If photorec cannot solve this request itself, is it possible to do this with a script which can filter the results online?

0
204
Member Avatar for merse

I would like to use an unsigned integer type for indexing a vector, but I want to use the best and optimal on every platform. How to implemet?

Member Avatar for L7Sqr
0
130
Member Avatar for merse

Wats wrong with this? std::vector<std::set<unsigned long> > surroundings; std::set<unsigned long> empty (); X = std::vector<std::set<unsigned long> > (N,empty); (where N is an ulong)

Member Avatar for mike_2000_17
0
174
Member Avatar for merse

What is the maximum length of an argument in the command line? It is not the same under DOS and Linux?

Member Avatar for Ancient Dragon
0
126
Member Avatar for merse

Are there ay freely available language library? I need class of LETTER, WORD, SENTANCE, TEXT, ... for example a letter can be more than one character, like sch in German WORD category has to be stored, like noun/adjective etc. I have to write my own package?

Member Avatar for merse
0
92
Member Avatar for merse

How to initializing a const set with list of values? I want to initialize in the preambulum, so I dont want to define and initialize an array before initializing the set. I want to do this in one row, if it is possible.

Member Avatar for lcordero
0
2K
Member Avatar for merse

How to determine the encoding of a text file? And are there any tools to handle the content of a text file independent of its encoding?

Member Avatar for Ancient Dragon
0
124
Member Avatar for merse

Maple printf using the same format system as C %g %g puts two numbers but lot of spaces are between them it is possible to eliminate the spaces? %-g is not good, why?

Member Avatar for DavidB
0
85
Member Avatar for merse

I would like to create a table with not fixed width. The width depends on the text length inside. But later I would like to create another table with the same width. It is possible?

Member Avatar for twiss
0
101
Member Avatar for merse

I would like to ignore empty line and line started with # [CODE] std::string line; while (getline(input,line)) { if (line[0] == '#') continue; if (line[0] == '?') continue; ... } [/CODE] Where ? is, I would like to put the end line character, but what is it in C++?

Member Avatar for mrnutty
0
221
Member Avatar for merse

Hi everybody, I have a simple mathematical member function of a class: [CODE] struct shell { double mc, ms, r0, v0, a0, w; shell(double mc, double ms, double r0, double v0, double w); double absv(double r) const; }; shell::shell(double mc, double ms, double r0, double v0, double w) { this->mc …

Member Avatar for Narue
0
174
Member Avatar for merse

It is possible to run dynamic web pages on a pocket PC without internet connection? I would like to read/write files using a browser on my pocket PC without internet connection.

Member Avatar for merse
0
183
Member Avatar for merse
Member Avatar for merse

I've made an empty mynote.txt in the same directory, and open the following code with Internet Explorer, and allow to write on hard disk (when IE asked) but nothing in the text file: mynote.txt after the run. what is the problem? [CODE]<html> <body> <script type="text/javascript"> function WriteFile() { var fh …

Member Avatar for scrappedcola
0
343
Member Avatar for merse

I've made an empty mynote.txt in the same directory, and open the following code with Internet Explorer, and allow to write on hard disk (when IE asked) but nothing in the text file: mynote.txt after the run. what is the problem? [CODE]<html> <body> <script type="text/javascript"> function WriteFile() { var fh …

Member Avatar for peter_budo
-1
104
Member Avatar for merse

How can I come to know that the system has done a rounding during a calculation or not? I mean for example 4/2=2 is an exact calculation of doubles because 4 and 2 are represented exactly. But for example 4/3 is not an exact calculation. I would like to know …

Member Avatar for merse
0
246
Member Avatar for merse

It is possible to exploit the built in floating point arithmetic of the processor without using the standard C++ built in floating point data types?

Member Avatar for mrnutty
-2
102
Member Avatar for merse

Number is always represented with the closest double? A real number is usually between two double representation. Always the closest representation is used or not necessary?

Member Avatar for Ancient Dragon
0
103
Member Avatar for merse

I cannot reproduce numeric_limits<double>::epsilon() I have tried the following code: [CODE] #include <iostream> #include <limits> using namespace std; int main() { double x = 1; double s = 0; for(double y = x; y == x; y = x+(s+=x*1e-20)) {} cout << "my calculation: " << s << endl; cout …

Member Avatar for vijayan121
0
242
Member Avatar for merse

numeric_limits<double>::epsilon() gives the error of (double)1.0 in the sense that 1+epsilon is the next double value which is represented. But how can we calculate the error of arbitrary double number?

Member Avatar for merse
0
189
Member Avatar for merse

If a double is initialized with 3.0 than we get an exact double, I mean 3.0 is an exact binary number, therefore 3.0 has no error during the conversion. But for example 0.1 is not an exact binary therefore the number (double)0.1 has error in its last digit. I would …

0
73
Member Avatar for merse

I hate when I have to acces a class data member like myclass.get_x(); I would like to simply write myclass.x; But I also want to stay with private x, I just want to read like myclass.x, but dont want overwrite it. It is somehow possible?

Member Avatar for mike_2000_17
0
147
Member Avatar for merse

I think the following problem is a basic one in numerical codes: Suppose that we would like to do a for loop [CODE] for (double x = 0; x < Y; x += dx) { // numeric code } [/CODE] The problem is that if we set dx=0.1 it is …

Member Avatar for merse
0
376
Member Avatar for merse

The Developer Studio compiles my code with no error and no warning, but I do not include the needed libraries. Maybe some standard libraries are loaded by default, but I cannot find in the settings, and dont know which ones! Can you help me?

Member Avatar for merse
0
91
Member Avatar for merse

Can you recommend a free C++ compiler and editor under windows which is good for error tracking? I mean, I can step the program line by line, and check the values of variables?

Member Avatar for Ancient Dragon
0
63
Member Avatar for merse

C++ has a standard function isinf()? like isnan()? If yes, it returns true in case of +inf and -inf also?

Member Avatar for merse
0
188
Member Avatar for merse
Member Avatar for merse

I have a code including [CODE]#include <iostream> #include <iomanip> #include <fstream> using namespace std; [/CODE] And it works with MinGW under XP. I want to compile the same code under Suse linux, but compiler said that for example: atof(), error() functions are not defined. The problem solved if I include …

Member Avatar for Narue
0
689
Member Avatar for merse

I would like to read input data from text file with fstream. But I don't know how to mix different type of get functions. I would like to read for example numbers after char "=" I try to use something like this [CODE]char c; double x; while (!inFile.eof()) { inFile …

Member Avatar for Narue
0
805
Member Avatar for merse

Is it possible to do function overloading with different return type? For example: [CODE] void myfunc(double x, double y); double myfunc(bool x); [/CODE]

Member Avatar for mrnutty
0
85
Member Avatar for merse

I have an enum type, for example: [CODE]enum signum {negative = -1, positive = 1, zero = 0, inward = -1, outward = 1, indefinite = 2}; [/CODE] I want to use at least one of the following castings: [CODE]signum s = positive; double x,y; x = double(s); y = …

Member Avatar for Narue
0
3K
Member Avatar for merse

Is it possible to delete a non dynamic variable? Or is it automatically deleted when I construct a new one with the same name? [CODE] int N; int N; [/CODE] Is this possible? My purpose is, that I want to use an object from a class in a loop: [CODE] …

Member Avatar for mrnutty
0
144
Member Avatar for merse

It is possible to set more than one default arguments with the same type at the end of the parameter list? [CODE]int myfunc(int a, int, b, int c = 42, int d = 137); { ... }[/CODE] Now if i call myfunc(x1, x2, x3); than c=x3 and d=137? or d=x3, …

Member Avatar for Fbody
0
131
Member Avatar for merse

A want to create some kind of global memory table. Every time when I create a specific kind of object, I wolud like to register it in the table, and save some data. Let assume that this "memory table" is a map, and a global variable. Let assume that I …

Member Avatar for merse
0
131
Member Avatar for merse

My problem is not serious, its just a question about the most beautifull solution. Maybe somebody has a better idea! I have a mathematical class having some numerical functions. It is convenient for me, and speed up the program, if I introduce a member array called "memory", and store the …

Member Avatar for mattjbond
0
182
Member Avatar for merse

I have a pair member data in a class: pair<double,double> memory; How can I change the firs or second element? If I simply write memory.first = 42 the compiler says read-only structure If I use memory = pair<double,double>(42,42) than: error passing 'this' argument I dont understand, please help me

Member Avatar for Galf
0
80
Member Avatar for merse

[CODE] #include <limits> using namespace std; const double double_nan = numeric_limits<double>::quiet_NaN(); double x = double_nan; if (x == double_nan) cout << "OK" << endl; [/CODE] I dont get OK! Why?

Member Avatar for dusktreader
0
112
Member Avatar for merse

The ascii code of 'á' is 160, but [CODE]int('á'); [/CODE] gives -31 Yes I know, I can use the formula 129+(int)fabs(int(mychar)); but are there any other solution? i tried to use [CODE]unsigned int('á')[/CODE] but its also ü31 which is a puzzle for me!?

Member Avatar for Narue
0
2K
Member Avatar for merse

Why get the last char twice? [CODE] #include <iostream> #include <fstream> using namespace std; int main (int argc, char* argv[]) { if (argc == 1) return 0; char c; for (int i = 1; i < argc; i++) { ifstream input; input.open(argv[i]); while (!input.eof()) { input >> c; cout << …

Member Avatar for Salem
0
90
Member Avatar for merse

It is possible to write, but the compiler dont find the function when I want to use func(x): [CODE]template <class T> double func(const double& x, const double& error = 0) {...}[/CODE] I have to write separately, like this why? [CODE]template <class T> double func(const double& x, const double& error) {...} …

Member Avatar for Dave Sinkula
0
105
Member Avatar for merse

Lets have a class (called Class with capital C) have a class member data. But when we declare the class data in the body of the Class, we have to initialize it with something (default constructor or other constructor) however in c++ the initialization used to task to the Class …

Member Avatar for Narue
0
140
Member Avatar for merse

It is not necessay to write out a name of a passed variable in case of declaration: For example its enough to write: [CODE]void myfunc(double,doble);[/CODE] and not [CODE]void myfunc(double x, doble y);[/CODE] But lets see a more difficult example: [CODE]template <class class_type> friend real myfunc(class_type& obj, double (class_type::*func)(double), const double&); …

Member Avatar for Ramakant62
0
95
Member Avatar for merse

If I have a template class: [CODE]template <class T> class myclass { public: T function(); }[/CODE] and it has a member function for example T function(), it is possible to define it separately for different kind of template parameters? So define somehow: int myclass::function(); double myclass::function(); mystruct myclass::function(); with totally …

Member Avatar for merse
0
145
Member Avatar for merse

Let us have a complex class with two double data member. If I would like to copy it by reference that means that I have two copy one or two pointers?

Member Avatar for merse
0
74
Member Avatar for merse

If I want to define what is a double -> double function pointer I use: [CODE]typedef double (*double_fp1)(double);[/CODE] But what if I would like to distinguish const double -> double it is possible? And the above definition consists the const double -> duble function?

Member Avatar for mrnutty
0
111
Member Avatar for merse

It is possible to restrict template parameter? [CODE]template <class T> class myclass { ... };[/CODE] For example I want that T might be int double or my own defined complex but nothing else!

Member Avatar for mrnutty
0
258
Member Avatar for merse

I have a very simple code and I don't understad it's result. I think, this have to print "OK" but does not! [CODE] #include<iostream> #include<math.h> class real { double value; double error; public: real(double,double); friend bool operator==(const real&,const double); }; real::real(double val, double err) : value(val), error(fabs(err)) {} bool operator==(const …

Member Avatar for merse
0
106
Member Avatar for merse

[CODE]#include<iostream> #include<math.h> class real { double value; double error; public: real(const double,const double); double get_value(); double get_error(); friend bool operator<=(const real&,const double); }; real::real(const double val, const double err) : value(val), error(fabs(err)) {} double real::get_value() { return value; } double real::get_error() { return error; } bool operator<=(const real& x1, const …

Member Avatar for Narue
0
120
Member Avatar for merse

It is possible to choose template parameter in runtime? when i try to construct an object wich has template parameter

Member Avatar for mrnutty
0
118
Member Avatar for merse

-x means (0-x) or means (-1*x) because I want to overload operators, which one is necessary to overload if i would like to make -x understanable for the compiler? I have a user defined type: real and I have operator overloading: real operator+(real x1, real x2); I also have constructor …

Member Avatar for jonsca
0
124

The End.