Forum

Posts

RECENTLY INDEXED PROGRAMMING SOLUTIONS OF C Language


Encoding error in GIF LZW compressed stream  

I'm writing a C library to export SDL_Surfaces to various image formats as an exercise. Now I'm working on the GIF format and I feel I'm very close to getting it working, but I've been at this for a while with no luck. I've already re-read all the specs, wiki entries, various other internet articles... Continue Reading
Views : 2632
Friday 7th of December 2012

How to make screen blink in MS-DOS with TSR program  

Hi everyone. I have written an MS-DOS based screensaver program by hooking timer and keyboard interrupt. After 10 seconds the screen is cleared and on clicking any button from the keyboard the contents of dos screen are shown. I want to know how can I make this screen to blink i.e. alternate between... Continue Reading
Views : 304
Friday 7th of December 2012

use of undefined type  

I have two classes(class A, class main). class main uses a pointer to class A and class A uses a global pointer to main. My problem is I keep getting these errors: a.h(12) : error C2027: use of undefined type ... Continue Reading
Views : 302
Monday 26th of November 2012

Re: obfuscation  

"James Kanze" $PHXLESSjames.kanze@$PHXGREAT wrote in message news:1180528868.407325.193550@q75g2000hsh.googlegroups.com... "The real question, of course, is why you'd want to obfuscate to begin with." To protect intellectual property: trade secrets, patents, copyrights... ... Continue Reading
Views : 309
Monday 26th of November 2012

Casting from pointer types to non-pointer types  

I am interfacing with a third party API (written in C, if that matters) that has an "event handler" function with the following definition: void event_handler(int event_code, unsigned long user_data); The function takes an event code along with the user ... Continue Reading
Views : 297
Monday 26th of November 2012

Defect Report: Unclear which members of match_results should beused in comparison [re] (N2284).  

Dear C++ committee, In "28.4 Header $PHXLESSregex$PHXGREAT synopsis [re.syn]" of N2284, two template functions are declared here: // 28.10, class template match_results: $PHXLESSsnip$PHXGREAT // match_results comparisons template $PHXLESSclass BidirectionalIterator, class... Continue Reading
Views : 385
Monday 26th of November 2012

** VIDEO SPEECH OF PAKISTANIAN CHIEF JUSTICE REQUESTED ***  

The nexus between 911 truth movement and its success is closely related to the democratic victory in Pakistan. The Pakistanian Military Dictator, a foolish patsy of Bush-Neocon- Crime Syndicate, provided critical validation to the 911 LIE by implicitly buckling under ... Continue Reading
Views : 190
Monday 26th of November 2012

Invalidating iterators after insertion/removal  

If I insert/remove an element in a set, will an iterator to this set automatically become invalid? Does the position of the iterator before the insertion/removal matter? How are vectors and lists affected?... Continue Reading
Views : 281
Monday 26th of November 2012

How can I get rid of "Warning C4307: integral constant overflow"  

Microsoft Visual Studio 2005 Version 8.0.50727.762 (SP.050727-7600) How do I get rid of "Warning C4307: '-' : integral constant overflow" from the following macro? #define d_ReturnMax(I_iTypeSize)\ ( (int64(1)$PHXLESS$PHXLESS((I_iTypeSize*8)-1))-1) There NO warnings when done as a... Continue Reading
Views : 292
Monday 26th of November 2012

Converting double (or float) to int  

After a little experimentation I see that with the g++ compiler on x86, when a double is converted to an int, the fractional part is discarded. Examples: int(0.7) == 0 int(1.3) == 1 int(-1.3) == -1 Is this behaviour consistent ... Continue Reading
Views : 271
Monday 26th of November 2012

JOB ID : BE 3001 >>> Our client needs a PeopleSoft Performance Tester  

JOB ID: BE 3001 Please refer to the Job ID in all your communication both in subject line of your email and in the body text. Hi Friends, Good Morning ,...Hope you doing good! Our client needs a PeopleSoft Performance ... Continue Reading
Views : 311
Monday 26th of November 2012

c++  

c++ is an object-oriented programming language. it was heveloped by Bjarne Stroustrup at AT&Bell laboratories in Murry Hill,New jersey,USA,in the early 1980's.stroustrup,an admirer of simula67and a strong supporter of c.... Continue Reading
Views : 141
Monday 26th of November 2012

How to use typedef in nesting class  

Hi,sir,please look at this code. /////////////////////////////////////////////////// #include $PHXLESSiostream$PHXGREAT using namespace std; class A{ private: class B;// public: int out(int x){ return outB(x)-$PHXGREATa; } B * outB(int x); private: B* root; class B{ int a; B(int init_a)... Continue Reading
Views : 272
Monday 26th of November 2012

Error when using std::less  

I get this error when I run my program: red_black_tree.cpp:188: error: no matching function for call to ?std::less$PHXLESSMyObj$PHXLESSint$PHXGREAT $PHXGREAT::less(MyObj$PHXLESSint$PHXGREAT&, MyObj$PHXLESSint$PHXGREAT&)?... Continue Reading
Views : 183
Monday 26th of November 2012

std::set constructor taking a sorted sequence  

In the C++ standard page 472 it says that you can construct a std::set in linear time if the constructor gets a sorted sequence of elements. But how is this possible when insert takes logarithmic time? Should the time not ... Continue Reading
Views : 189
Monday 26th of November 2012

best way to add date and time to a c++ program  

Could someone advise me on the best code to use in order to add date and time information into my program. I need the data in the form of either a string or a c_string. The code needs to be ... Continue Reading
Views : 147
Monday 26th of November 2012

a question about typedef syntax  

Hello, I think the syntax of typedef is typedef existing-type new-type However, I've seen a statement typedef string stringarray[42]; $PHXGREATFrom the programs that use stringarray, I can deduce it represents the type string[42]. If so, why is it not defined ... Continue Reading
Views : 291
Monday 26th of November 2012

Fight Stopping AIDS, Let's Do it...  

Hi Friends, Let's Stop AIDS, it's increasing like a forest fire... See the page below and learn more about it. www.chulbul.com/aids.htm Let's Know more about stopping AIDS today !! ________________________--- Join the Revolution !! http://www.orkut.com/Community.aspx?cmm=27495757... Continue Reading
Views : 269
Monday 26th of November 2012

RTTI basics  

Hi all. I would like to use a class hierarchy where one const data field holds a class-specific value. I would like to do something like class base{public; static const int n}; class a : public base{public:}; class b : ... Continue Reading
Views : 272
Monday 26th of November 2012

Template specialization  

Hi, I've two modules in my project. One is a dll and another is an exe. The dll contains the following template code in one of its header file. #ifndef __STACK_HEADER__ #define __STACK_HEADER__ template$PHXLESS class T$PHXGREAT class Stack { public: ... Continue Reading
Views : 255
Monday 26th of November 2012

boost serialization : attributes and node ordering  

I came across a situation where I wanted to have some flexibility with object serialization. I was thinking about two things: 1. Object attributes, for example, can we have something like this with boost: $PHXLESSpa2 class_id="0" tracking_level="0" version="0"... Continue Reading
Views : 321
Monday 26th of November 2012

How to populate an array of char* pointer dymanically  

In my code, I have an array of char* pointer which is populated statically: void function1() { char *ppsz_argv2[] = { "abc" , "def", "dummy"}; //... } But how can I populated it dynamically? void function1(string& str1, string& str2, string& ... Continue Reading
Views : 188
Monday 26th of November 2012

Re: basic question about "clearing" a string....  

Well, I think I can understand Avalon's rant. If someone were to answer with a smart-alec response that Bazarov did, I think I would be pi$$ed off too. A straightforward answer like what Herring said may have averted these quarrels... ... Continue Reading
Views : 364
Monday 26th of November 2012

Positions still available in the South of France. deadline for applications : 15th of June 2007  

- Fluent English (dont need to speak french), any country welcome. - Experience in C, C++, Java, Unix,Oracle and SQL,UML modeling / Rose (school project ok or professional experience) or Experience in PHP, MySQL, C, C++, Linux, Ajax, web 2.0 ... Continue Reading
Views : 250
Monday 26th of November 2012

hey help plz..c++ project..  

hey plz if some body could advise me a gud project in c++..which could be big and yeald my all concepts of c++ best u know... thanx..... Continue Reading
Views : 145
Monday 26th of November 2012

function declaration with default parameter  

Hi there, I am trying to declare a function that takes a std::list$PHXLESS$PHXGREAT parameter. I want this function to have an empty list as a default parameter. It's a template function also. Currently i am stuck because my compiler does ... Continue Reading
Views : 219
Monday 26th of November 2012

explicit copy constructor  

Hello, I noticed the following in the "C++ Coding Standards" book. Why should the code on line 30 be in error? Transmogrify accepts a (B obj), and we are passing it a B obj. I understand why the other call ... Continue Reading
Views : 267
Monday 26th of November 2012

Object oriented callbacks and differences in member vs non-member function pointers  

Hi, I have great respect for the contributors of this newsgroup and have a question that I can't seem to find an answer for, I need to understand if it there is anything in the C++ standard that prevents or ... Continue Reading
Views : 319
Monday 26th of November 2012

How to Convert a char array to int  

Hello all, I'm new to C and I'm having a heck of a time trying to convert a char array element to an integer. Declaration of my char array is: char myarray[80]; ....then I scanf a number from the user ... Continue Reading
Views : 238
Monday 26th of November 2012

Re: SmartPointer & Inheritance & Explicit Constructors  

"Jon Harrop" $PHXLESSjon@ffconsultancy.com$PHXGREAT wrote in message news:465d8c7c$0$8747$ed2619ec@ptn-nntp-reader02.plus.net... $PHXGREAT coder_lol@yahoo.com wrote: $PHXGREAT$PHXGREAT Well, I came across Scott Meyer's SmartPtr example from some 10 years $PHXGREAT$PHXGREAT ago. I like... Continue Reading
Views : 249
Monday 26th of November 2012