Forum

Posts

RECENTLY INDEXED PROGRAMMING SOLUTIONS OF C Language


Command line execution  

Hello I need to execute a command line (DOS style) program from an C++ Builder 6 application. I need to execute a java program. For example: To execute java application java_app with 2 parameters: param1 and param2 prompt$PHXGREAT java java_app ... Continue Reading
Views : 104
Sunday 25th of November 2012

Seeking code to parse header files  

I have been searching, unsuccessfully, for a program which will parse header files and generate stubs for all external declarations (classes, functions, $PHXLESSshudder$PHXGREAT global variables). I want this so that I can generate dummies for interfacing software, for unit testing. ... Continue Reading
Views : 74
Sunday 25th of November 2012

ICC with -cxxlib-gcc --- results in ld: /usr/lib/crtbeginS.o: No such file error  

Hi All, I am compiling my c++ code with ICC 8.0 compiler with -cxxlib-gcc option...But this results in following error.. /usr/lib/crtbeginS.o : No such file: No such file or directory Though I am including the Path for crtbeginS.o . Code ... Continue Reading
Views : 612
Sunday 25th of November 2012

visual C++  

Hello, This is a simple question : I have ( not purposely ) changed the appearance of my visual C++2005, making a wrong click with my mouse. Now the errors and messages of output are gone. Since one day, I ... Continue Reading
Views : 63
Sunday 25th of November 2012

.cpp question  

Ok, I know in Java we can seperate class files so that we could use them later on. I am wondering if I could do the same for C++... Perhaps have a main.cpp and lets say for example function.cpp... I ... Continue Reading
Views : 123
Sunday 25th of November 2012

Re: Guitars, tabs, amps and more  

...! http://www.arabzwaj.com/welcome/view...?p=11408#11408 http://www.arabzwaj.com/welcome/view...?p=11395#11395 http://www.arabzwaj.com/welcome/viewtopic.php?t=2329 www.arabzwaj.com http://www.arabzwaj.com/welcome/viewtopic.php?t=2333 ... Continue Reading
Views : 69
Sunday 25th of November 2012

I can't get operator= to work (or the conversion op) in this particular case  

Hello I've been trying to make my own vector class which would store only unique objects. Everything is nice, except that I can't manage to do something like this: std::vector$PHXLESSint$PHXGREAT v; UniqueVector$PHXLESSint$PHXGREAT uv; v = uv; I am getting the ... Continue Reading
Views : 167
Sunday 25th of November 2012

save $ 90 Per Month On Your Entertainment  

Fed Up With Paying a Monthly Fee For A Handful of Channels That Don't Satisfy Your Needs? - Most people pay $19 to $90 a month for a very limited number of TV channels. If you fall into this category ... Continue Reading
Views : 88
Sunday 25th of November 2012

copy some elements of a vector in reverse order  

Question: Give a vector that has 10 elements, copy the elements from position 3 through 7 in reverse order to a list I have a solution in the below, but I'm feel there could be a better one, (just not ... Continue Reading
Views : 94
Sunday 25th of November 2012

regarding sizeof operator for class with no data variables  

consider this code snippet #include$PHXLESSiostream$PHXGREAT using namespace std; class { void func() { };... Continue Reading
Views : 145
Sunday 25th of November 2012

regarding sizeof operator for class with no data variables  

consider this code snippet #include$PHXLESSiostream$PHXGREAT using namespace std; class A { void func() { } void func1() { } void func2() { } void func3() { } }; int main() { cout$PHXLESS$PHXLESSsizeof(A)$PHXLESS$PHXLESSendl; return 0; } why is the compiler forced ... Continue Reading
Views : 155
Sunday 25th of November 2012

programme asp.net  

hello... Continue Reading
Views : 117
Sunday 25th of November 2012

member functions and implicit "this"  

this is from C++ Primer 4/e page 260: there is a class named Sales_item and same_isbn is a member function of that class. bool same_isbn(const sales_item &rhs) const { return isbn == rhs.isbn; } author says the word const modifies ... Continue Reading
Views : 109
Sunday 25th of November 2012

iostream cin problem  

Hi: Hope this isn't an IDE or OS problem. I'm using VC++ v6 and using cin in a console program. I use cin.getline() and sometimes just cin Oh... Winders XP Pro Corp Ed. (ooohh... scary, no?) SP 1 on XP ... Continue Reading
Views : 85
Sunday 25th of November 2012

Debugging Multi-core Processors.  

Hi. Looking for some documents/resources or links which discusses about "Debugging Multi-core Processors" for SMP, SMT, AMP, etc. Really appreciate if I can be helped somehow. BR Mukesh K Srivastava... Continue Reading
Views : 88
Sunday 25th of November 2012

const data in descendant classes  

Hello, I would like to be able to store some constant data that is specific to each descendant class. This data would then be accessable by base class functions. However, I cannot find out how to do this. I thought ... Continue Reading
Views : 95
Sunday 25th of November 2012

shift oft signed ints  

Hello, is there a guarantee by the standard that the following code will result into a correct result always?: #include $PHXLESSiostream$PHXGREAT #include $PHXLESSstdint.h$PHXGREAT using namespace std; int main() { int16_t i = - 36; int16_t r_sl = (i$PHXLESS$PHXLESS1); int16_t r_sr ... Continue Reading
Views : 93
Sunday 25th of November 2012

ifstream character read problem  

HI all,, I used linux g++ 3.2.3 ...In my c++ code i am reading bit values from a file as character..using the following: char revStr[41],correctStr[41]; int count=0 ifstream in("config.txt",ios::in | ios::binary); if(!in) { cout $PHXLESS$PHXLESS "Cannot open read file.";... Continue Reading
Views : 132
Sunday 25th of November 2012

Array corruption  

Hi: This prob "magically" stopped and I'm not sure if I can recreate it, but thought I'd share it and maybe learn something. #include "stdafx.h" #include $PHXLESSstdlib.h$PHXGREAT #include $PHXLESSmath.h$PHXGREAT #include $PHXLESSfstream.h$PHXGREAT //iostream.h // yes, I'll... Continue Reading
Views : 85
Sunday 25th of November 2012

A question about multiple inheritance in C++!  

Hi,In the following function: #include $PHXLESSiostream$PHXGREAT using namespace std; class V { public: V() {cout $PHXLESS$PHXLESS "V()" $PHXLESS$PHXLESS endl;}; V(int) {cout $PHXLESS$PHXLESS "V(int)" $PHXLESS$PHXLESS endl;}; }; class A: virtual V { public: A(){}; A(int){};... Continue Reading
Views : 140
Sunday 25th of November 2012

learning c++  

I have learning C++... Continue Reading
Views : 121
Sunday 25th of November 2012

A Design Problem  

Hi All, First of all forgive me for the length of this post. I am developing one library for some text editor. In this library I want to provide a set of C++ classes which will enable client (of the ... Continue Reading
Views : 74
Sunday 25th of November 2012

How to allocate a static class attribute in c++  

Hi, I have a static class attribute in my class: class A { public: static B aB; } How can I allocate this static class attribute? I think I need to do this A::aB = ??? ; If I do ... Continue Reading
Views : 33
Sunday 25th of November 2012

Problems with template specializations.  

Please check the following snippet.. template $PHXLESStypename T$PHXGREAT class CheckUni { public: void This() { std::cout $PHXLESS$PHXLESS "Basic type\n"; } }; template $PHXLESStypename T$PHXGREAT class CheckUni$PHXLESS CheckUni$PHXLESST$PHXGREAT $PHXGREAT { public: void This() {... Continue Reading
Views : 181
Sunday 25th of November 2012

Benefit of Source File's  

What is the benefit of some source files, rather than all in one file? Is that has something to with make, build, etc?... Continue Reading
Views : 76
Sunday 25th of November 2012

Alternatives to gigantic static array  

I need advice, please. I have a DLL that is used for looking up zip code data according to various criteria. I defined a struct for each data record, and built a static array, like this: typedef struct { char ... Continue Reading
Views : 107
Sunday 25th of November 2012

convert char * to char []  

Help! I am trying to figure this out, and I have the impression that it should be really easy, but I'm at a loss. Here's my problem: I want to take the output from const char * string::c_str(); and convert ... Continue Reading
Views : 251
Sunday 25th of November 2012

x/x=1.0 in double-Arithmetik  

Let: double x,y; double z = max(x,y); Does the standard ensure that ( z == 0.0 ) || ( x/z == 1.0 ) || ( y/z == 1.0 ) always gives true? With best regards, Tobias... Continue Reading
Views : 74
Sunday 25th of November 2012

Casting unrelated types  

Hi all, is there a standard conformant way to cast a unsigned char $PHXLESScv$PHXGREAT* to a char $PHXLESScv$PHXGREAT* and vice versa (cv is the same constant/volatile qualification in both cases) even on platforms where char is defined to hold the ... Continue Reading
Views : 78
Sunday 25th of November 2012

Strange error with iterators  

Hi, I've wrote this function which should add a comma for every 3 digits in a number (so that it looks something like 5,000). This is my function: std::string formatNumber(int number) { // Convert the int to a string. std::string ... Continue Reading
Views : 417
Sunday 25th of November 2012