General C++ Programming - August 2011 (Page 4)

How can i find a char value's length?
 
I tried this.This is run.But it is taking a system or another error: #include <iostream> using namespace std; char *a; int main() {cout<<"Write ur text: "; ci...
[8 replies] Last: How fgets() func do control this?I sweat this. #include <iostream> u... (by Helegurbann)
Template class inheriting template class
 
Can someone please help me clean up the problems I'm having with this following code; I think what I'm trying to achieve is apparent with the code but ask me an...
[2 replies] Last: After some testing around discovered the problem was that I had an enu... (by sixequalszero)
by Shabla
Static / Namespace / Global / ???
 
Hi, I am starting a little game project, a 2D RPG using Qt and OpenGL. I am just starting and would like to have an Art class, which would contain all the arts ...
[1 reply] : namespace Art{ QHash<QString, QPixmap> images; QPixmap getIma... (by hamsterman)
by ales88
strange call function without parameter
 
Analyzing a source code I've bumped into a strange function call. This function is defined with the following prototipe: static void nl_kaodv_callback(int ...
[4 replies] Last: Well, with a name like attach_callback_func(), I think it's more than ... (by andywestken)
What does this number mean in C++ class declaration?
 
In the following class, what does :1 mean? Thanks. class X { public: bool mIsActive:1; };
[2 replies] Last: As it stands, class X is using a pointless bitfield. sizeof(X) == size... (by andywestken)
First attempt Load/save program
 
Yesterday I was looking through tutorials, and nothing really made much sense to me. The first parts made sense, but then it seemed like a huge technological ju...
[2 replies] Last: Why you open SAME file in different streams before closing even 1 I... (by Password Protection)
Sorting Algorithm used in stl map?
 
Hi everyone, if anyone knows which sorting algorithm used in c++ stl map. please let me know.... Thanks in advance
[2 replies] Last: std::map is most commonly implemented as a red-black tree, although as... (by helios)
opening file in c++ and acessing to the contents
 
i want to read a text file(notepad) file in c++(open it) and then print the content of it.what should i do?i mean where should i place the text file and which s...
[3 replies] Last: i used the codes that syuf wrote like below(my text file name that i ... (by behrad kiani)
by siloan
'new char' issue
 
Hi there, For example char aa -> char *aa=new char ; But for char aa how to do this in the same way? char *aa=new char isn't good....
[10 replies] Last: [quote=Syuf]The same outcome will be untill you haven't overflow. (sic... (by closed account zb0S216C)
Float formatting
 
Hello. I would like to be told how to format the decimals of a float variable. In C, you just do it like this: printf("The number is %3.2f",x); It gives yo...
[1 reply] : You can use formatting flags(<ios>) or/and manipulators (<iomanip>). I... (by Syuf)
Fullscreen flicker in SDL
 
Im making an animation in SDL and VB 2010, but when i toggle fullscreen the screen flickers. int main(int argc, char* args ) { SDL_Init(SDL_INIT_EVERYTHI...
[no replies]
Handling Namespaces
 
So, recently, I've found something rather stupid in the boost libraries. I learned that the place holders for boost bind (_1, _2, etc.) are in global namespace ...
[4 replies] Last: Galik, I'll look into it. (by closed account S6k9GNh0)
Pointers in a vector pointing to stack objects,
 
Hi all, Not sure if this should be under the beginners forum but here we go :) Say I have declared som objects: Dog Dog1; Dog Dog2; Dog Dog3; Then...
[3 replies] Last: Ok great thank you both for the fast replies! (by Wernert)
Opengl Texture snipet
 
c = ((((i&0x8)==0)^((j&0x8))==0))*255; how is this line is explained??
[2 replies] Last: c is 255 when one and only one of the following is true: * Bit 3 in i ... (by helios)
Using db in cplusplus
 
Can i use database in c++, hence, what is d code?
[3 replies] Last: Thanx 4 ur help i may come back soon. (by abdulhameed82)
Team Projects?
 
I am currently free and if anyone is looking for someone to work on a project I am interested. I am relatively proficient in C++. I am willing to learn new libr...
[1 reply] : Would you be interested in one of the following? They're both possible... (by helios)
by K33p3r
Help for a rather complex chance program
 
Good day everyone, I am a C++ amateur and I am planning to create a special program for a future competition. To understand I'll provide all the details: ...
[8 replies] Last: For some reason when I compiled your previous code it showed 22,22% on... (by K33p3r)
Memory question.
 
OK guys, I have a quick question. If I pass a 4-byte object into a function, does it take up 8-bytes of memory? And same question, but if I do so with passing...
[1 reply] : No. The object will be copied, and each copy will use 4 bytes, but the... (by helios)
by madjas
creating a new array
 
hi im trying to add mode memory in this stack function after it become full. i want to use this loop: for (int i = 0; i < myCapacity; i++) temp = m...
[16 replies] Last: why < myCapacity - 1 the reason, it implies that my capacity is... (by madjas)
by DSTR3A
Get HTTP Headers
 
How do I a http header request in C++. I'm usimg Visual Studio 2010 with Windows 7. Any help appreciated, I've searched hi and lo. Also I'm using WSA and I don...
[no replies]
August 2011 Pages: 123456... 29
  Archived months: [jul2011] [sep2011]

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