General C++ Programming - January 2012 (Page 35)

Seating arrangements in my program
 
Im having the a problem with my seating arrangments with in the class ranges. In first class, it is only mean to book 1-5, if i enter 6, it will come up with t...
[10 replies] Last: You're not doing what I suggested. Lines 89 and 57 should be else stat... (by Gaminic)
nested loops and start or its condition with parent loop
 
I search to stable formula When i see nested loops, i can say their answer quickly. such as: for (i = 0; i< 5; i++) for (j = i ; j < 10; j++) co...
[1 reply] : And what your Q is? (by Ivan Sidarau)
Two classes derived from virtual base class; one of which needs an extra member function
 
Hi, I have a simple class hierarchy comprising two derived classes and a pure virtual base class. Each derived class provides an alternative way to carry out...
[11 replies] Last: If you don't like the template solution, then pass a boolean construc... (by canismajor)
by Mat001
elements of an array
 
Hi all, I'm working with a two dimensional array. I have a condition: "if all elements in a sequence are all 2 then end" but when I write a for lo...
[3 replies] Last: Late response... Cheers guys. I got it now. I needed to use a nested... (by Mat001)
is there an easy way to rename similar named stuff?
 
for example i have a function dennis(); and i call it 10 times in my program. but suddenly i want to rename the function to dennisM();. is there an easy way to ...
[6 replies] Last: thanks, found the option in control + H. im using notepad++ btw. :) (by denniscpp)
by fanasy
the problem of c++ encapsulation
 
hi all, I need help on c++ encapsulation my code to test the encapsulation: #include <iostream> class test { private: void puts(std::string a); }; vo...
[2 replies] Last: thanks! my mistake. happy new year! (by fanasy)
differentiating derived classes
 
let's say I have a class B and 2 classes A and C that are derived from B. If I have a vector of B's and I fill it with A's and C's, is there any way to tell ...
[2 replies] Last: If you want to differentiate As from Cs, ¿why do you them in the same... (by ne555)
Function Pointer Trouble
 
I have two structures: SOInterface and SOEntity . SOInterface contains this function pointer: void (*fpQueryState)(); and SOEntity contains this method...
[2 replies] Last: Now that you've said that, I dug a little bit deeper and found this pa... (by closed account zb0S216C)
I have a vector and a list of objects to remove from the vector
 
I have a std::vector of objects. I also have a list of objects that need to be removed from this vector. (probably contains iterators) My problem is that...
[1 reply] : Use a list. The other iterators will be valid after deleting an objec... (by mik2718)
by zeos
Problem with GCC and G++ !!
 
hello every body and happy new year 2012 .... i want to compile enigma plugin and the probleme is gcc -v Using built-in specs. Target: i486-linux-g...
[2 replies] Last: Have you read through all the stuff on the wiki and info on the site t... (by Mats)
Random number between two floating point numbers
 
Hello I want to generate a random number between 0.2 and -0.2 here is what i have so far float randomNumber; randomNumber = (float)random()%((-0.2f+0.2f)+1.0...
[2 replies] Last: I don't know if there exist random() in c++, where did you find that... (by eypros)
How to read a file located at C: drive?
 
Hello, my name is Morgan and I am starting to learn visual studio c++ and would like to request help with an issue I am having. I have read a few threads on thi...
[5 replies] Last: @MorganAW - I assume you're using a new-ish version of Windows. SInce ... (by andywestken)
accessing application's functions from inside a dll or plugin
 
hi. I wanna write an application-plugin pair . the plugin should call some application's functions , and retun some values to the host applicatopn. Please he...
[6 replies] Last: Are you coding in C or C++ ?? In particular, how are you communicatin... (by andywestken)
loop not ending why ?
 
int size=0; cin >>size; string testcase ; int ii=0; while(size!=0){ cout <<ii<<size; cin>>testcase ; size=size-1; ii=ii+1; } my this loop is n...
[7 replies] Last: string testcase ; that would actually compile in mingw and gcc. ht... (by Dacster13)
array = pointer ?
 
Hello, I just read the tutorial provided on this website and the section about pointers and arrays puzzled me a little. Given the information of the tutorial an...
[2 replies] Last: An array is not the same as a pointer, even though you can apply squar... (by Galik)
Valarray modulus
 
Do valarrays have the modulus operator come with them? I am just doing question 6 from Project Euler, and I wanted to try out the valarrays. At the moment, I ...
[2 replies] Last: Thank you very much, kev, you're awesome! (by Ben Duncan)
what's the problem
 
can someone tell me why this code doesnt work? void room::emptyMB3() { for(int i = 0; i < MB3.size(); i++) { MB3 ->setstatus("UNASSIGNED"); } fo...
[3 replies] Last: i made a mini version of the code for you guys to try out. to check fo... (by denniscpp)
by anjaly
is it valid in c? how can i convert this function to work in c? please help me...
 
CV_IMPL void cvCalcOpticalFlowFarneback( const CvArr* _prev, const CvArr* _next, CvArr* _flow, double pyr_scale, int levels, ...
[1 reply] : what is this CvArr ( struct or class ) . also it is not clear that cv... (by bluecoder)
by poolet
problem with function
 
example of problem:: 5+5 = 10 and then the user used other operate 5 - 2 = 3 the program will print out the total of 5 -2 = 3 and the sum is 13 my problem is t...
[3 replies] Last: ne555 thats for forum... just search and you will find it I can't fou... (by poolet)
how to inherit attributes from one class to another?
 
im having some trouble inheriting attributes from a class. my code: #include <iostream> #include <vector> #include <cstdlib> #include <set> #include <al...
[1 reply] : You should make members you want accessible in derived classes protect... (by Zhuge)
January 2012 Pages: 1... 33343536
  Archived months: [dec2011] [feb2012]

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