General C++ Programming - August 2010 (Page 3)

extern "C" unresolved external symbol
 
Hello, I am writing a plugin, which register it self with main program when its starter function is called. the code snip below is taken from the plugin pro...
[1 reply] : I had forgotten to add main.lib to the plugin project, pretty nooby (by afraidofdark)
Protected static members - Linker error
 
Is there any information on what happens if I have a protected static member? Let me give you an example from a code I am myself writing: class atom : publi...
[12 replies] Last: Thanks for asking me to check it. I think it works. Here is the main()... (by balajiram)
by Morph
What does jpeg file include
 
I am wondering about what .jpg files holds in it. What kind of code. Are there any articles or some kind of tutorial like things.
[5 replies] Last: http://en.wikipedia.org/wiki/Jpeg#Syntax_and_structure (by Bazzy)
by Null
Hooking ostream?
 
Hello, I'm wondering if there's a way to hook ostream (cout) so if I write cout <<"sometext"; a callback function would be called and I could do something w...
[1 reply] : It seems that it is possible to overwrite operators: #include <iostr... (by hamsterman)
how do i put a loop around a switch statement?
 
i have the following switch statement to provide a menu. I want the menu to appear again after each selection. I tried using a "do - while" loop but it didn't ...
[11 replies] Last: line 104... norecs has no initial value (by pyschoder)
Intercepting ostream between fields
 
Second try. Is there a way in a class derived from ostream to intercept control between output operations to ostream. I've considered: 1) Overloading e...
[4 replies] Last: Thanks for the pointer to the Boost Iostream library. (by AbstractionAnon)
Directly modifying string contents
 
From this site's reference page on the string::data() method (http://www.cplusplus.com/reference/string/string/data/ ): The returned array points to an in...
[12 replies] Last: I don't think there is a guarantee that the pointer returned by data()... (by Galik)
by LB
Convert char to bitset?
 
I need to convert a char to an 8-bit bitset. How should I do this? I tried the following: bitset<8> ToBits(unsigned char From) { union //CharBit_t { ...
[4 replies] Last: Ahh, thanks! I can't believe I missed that. (by LB)
openSSL RSA Enc/Dec
 
Hello, I'm really close to having all the pieces I need for my program. The last piece that is causing me issues is RSA Encrypt/Decrypt. This is what I have ...
[4 replies] Last: More Progress, this bit of code will encode/decode properly most of ... (by Phantom139)
C++ vs. Java inheritance rule for protected members
 
Consider the following Java program: class Parent { protected int foo; } class Child1 extends Parent {} class Child2 extends Parent { pub...
[3 replies] Last: To answer your question about making your C++ program equivalent, you ... (by closed account 1yR4jE8b)
Classes as members of other classes
 
I'm sure this is possible, I just do not know how to do it. I want to have a class of mine to have members that are of another class. The constructors of the ot...
[6 replies] Last: That worked =) Thank you. I knew it was possible, just didn't know ... (by shadowayex)
by evaj03
Using locale version of isalpha
 
Hi, I am trying to check for valid Polish characters using the locale version of isalpha. I have the following test code which uses a string of valid Polish d...
[1 reply] : May I suggest ICU? http://site.icu-project.org/ (by helios)
Click and Execute
 
How do I hide a command to execute behind a GUI button? The program is written in C++ and I would like to press a button and execute the program. I am sure this...
[2 replies] Last: OK, and how is the button handler added? What language/platform? (by n4nature)
how to create htm file?
 
I want to convert a txt file to htm file. but when I use ofstream ofs("*.htm"). I find it will automatically combin two lines content to one line in htm f...
[12 replies] Last: when I get rid of *.it work well.thanks a lot. (by peripheral)
by yts
how to clear screen?
 
Hi,everyone, a new beginner here. How to clear the command prompt screen so it will not show the C:\Users\user\desktop ? i already using system("cls");
[2 replies] Last: http://www.cplusplus.com/forum/articles/10515/ (by Duthomhas)
Should I use bit fields? (1,2,3)
 
Hi I read this on wikipedia: bit members in structs have potential practical drawbacks. First, the ordering of bits in memory is cpu dependent and memory p...
[40 replies] Last: It would seem that the mask.template should be mask::template . Ca... (by jsmith)
by eye51
Final Words : References or Pointers
 
Hi, There are already many threads of this on this forum. But again asking related question, so please excuse me !!! I have gone through lot of material o...
[1 reply] : There's no difference in performance. Use pointers if the parameter i... (by Athar)
Library not linked correctly (at all?)
 
I want a class to register itself to an other class at runtime before the main() is run. I tried several appreaches which all worked fine, when alle src file...
[4 replies] Last: I got the same problem. i think it links the objects in shared librari... (by bartoli)
Create Instances of a Class During Runtime (1,2)
 
Hi. I am new to this forum, but have been programming in c++ for a few years now. I couldn't find a thread that had this same question, and if I missed it, I'm ...
[24 replies] Last: You should use char *name; (by bolohardik)
Vectors
 
This is probably pretty basic, but I'm having a problem with vectors. I have a vector of an object, and when I try to access the vector, my program crashes. ...
[1 reply] : After further analysis, I've found the issue. It wasn't with my vector... (by shadowayex)
August 2010 Pages: 12345... 20
  Archived months: [jul2010] [sep2010]

This is an archived page. To post a new message, go to the current page.