General C++ Programming - September 2010 (Page 15)

by LB
Why are there Vector Iterators??
 
I can see the point in map iterators and they make perfect sense, but vector iterators?? What is the point in a vector iterator? They don't make sense to me for...
[2 replies] Last: Adding to what Disch has already said about the common interface, the ... (by Galik)
by riun23
Classes won't compile
 
Hey guys, i was wondering why Dev-C++ won't compile the following code: (P.S. This is coming out of a C++ Learning book, and it still won't compile) /* Na...
[8 replies] Last: dev c++ it's open source download the patches. (by clover leaf)
by ps1000
Segmentation fault when calling function
 
Hello I had a problem with calling a function ... (it's working now, but I'd like to know why ;-) ) my code is like this: MyClass c = get_my_class(some...
[5 replies] Last: [quote=Disch] } // EXPLODE Thanks for this, it gave me a real laugh :... (by LB)
by wtf
Testing for logic errors in non-optimized recursive loop
 
I had trouble with my previous diminish functions in my sudoku class so I rewrote them, this time recursively. Just as I had expected it loops for ever, althou...
[3 replies] Last: think i found out what it was. I was using a int points; to keep trac... (by wtf)
WWaaarnniiing??!!
 
Hello.I get the warning 125 Z:\media\g_\fff\implementation.cpp address of local variable `szreport' returned at the following function char* ...
[15 replies] Last: They are. But the point is, if you pass the pointer to the function... (by Disch)
by saik
Issue with Vectors
 
I am trying to initialize a vector with zero and assign values to it(10,20,30 in this example).The program crashes when its executed. I guess the program crash...
[5 replies] Last: Hi Galik, Thanks for your prompt response. Yes, after making the c... (by saik)
by JaR
Pointer-to-Member-Function Conversions and Virtual Base Classes
 
Hello! I would like to have some input on this obscure feature of the language. First some code to clarify the issue: class Base { public: void...
[no replies]
Handling arrays of objects in memory (1,2)
 
Hello! I want to understand how dynamic memory allocation works for some code I wrote, so I'll try to describe it in a simple example: I have 2 simple obje...
[21 replies] Last: I cannot change my implementation now cause the code is almost compl... (by deluvian)
by mTy
[C++] Button handle
 
Hey, i have a small question. How can i get a handle form a other button in another programm and how can i aktivate this button? Thanks for you help! :)
[5 replies] Last: Haven't you taken a look with Spy? WM_LBUTTONDOWN and WM_LBUTTONUP (by kbw)
by saturn
traits classes
 
Hi, I am trying to figure out how to generically wrap some similar classes from an external library, possibly using traits classes. The library exposes tw...
[3 replies] Last: [bangs head on wall] thanks everyone, that's brilliant. The magic t... (by saturn)
Serial Port Communication Problem
 
Hey all, I have a project that I am working on to take machine information via serial port and monitor it remotely. The first program is suppose to take the...
[no replies]
Ponters to function and to member function
 
Hi, I'm using GSL libraries to solve a system of ODE. To set the system, the code is like this: gsl_odeiv_system sys = {func, jac, size, parameters} whe...
[1 reply] : How can I pass member function pointer to sys? You probably shouldn't... (by kbw)
by RS232
rewrite all bytes in a file with a 0.
 
Hi to all, i have some notes regarding to secure delete of files uisng c++, but due to lack of my knowledge i am unable to grasp it. need a bit help from pros....
[1 reply] : Why don't you post what you have so far and say what you have problem ... (by Bazzy)
by saik
Pointers to object
 
Please explain what does "item *d=p" mean here. #include <iostream> using namespace std; class item{ int a,b; public: void getdata(int,int); ...
[8 replies] Last: item *p=new item ;//NOW P POINTS TO THE FIRST array element item *d=... (by hooshdar3)
Accessing the caller
 
Hello.I am wondering how can we determine type of tne caller?Any Idea?
[10 replies] Last: Thank you all. Disch, you helped me a a lot. I will do it throug... (by hooshdar3)
pdcurses sound
 
Hi there, my first post on this forum :) Is there possible to have sound in a pdcurses project? I did try to use the windows Beep() thingy but as it delays th...
[1 reply] : Yes, but [N|pd]curses does not provide the ability to produce sound. Y... (by Duthomhas)
hash vs array
 
I have a vector of strings. For each string, an integer value is associated. I want to retrieve the strings, ordered by their value and original order (Note: t...
[5 replies] Last: (The following are the average times.) Sorting a vector once takes ... (by helios)
Object is set to NULL after returning from a member function
 
Hi guys, My program seems to crash in the weirdest state. While debugging with gdb, I found that just after return from member function the whole object is set...
[2 replies] Last: You didn't post enough code for us to spot the problem. You'll need t... (by Disch)
How to get rid of brackets on C++ macro expansion?
 
For example, indstead of this macros(param1,param2,param3,param4,param5,param6,paramN); ;macros p1,pN
[1 reply] : You can't. And macros are evil. You should prefer inline functions... (by Disch)
Single inheritance and Multiple inheritance
 
Anybody help me ! C++ support multiple inheritance. And multiple inheritance certainly contain single inheritance. And I think that, when we talk about single ...
[7 replies] Last: Because, in msdn, microsoft say about single inheritance in C++, but ... (by warrant)
September 2010 Pages: 1... 1314151617... 20
  Archived months: [aug2010] [oct2010]

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