General C++ Programming - September 2011 (Page 27)

by Judde
Help with STL and objects
 
I'm trying to make a program that plays a card game. I currently have a function that returns a card object pointer. This works perfectly. I am able to use th...
[2 replies] Last: Ok I'll change it to use the card object instead. Thank you for your h... (by Judde)
by KalebQ
Breadth First Search solution tracking
 
I have an assignment involving Depth and Breadth first searching using stacks and queues respectively, and I think I have the search down for both, but I can't ...
[no replies]
Trouble adding elements of an array
 
Hello Everyone, I have a small problem that I think can be resolved easily. I am making a polynomial program, and the only hang-up is adding the coefficients...
[4 replies] Last: Thank you manas, your advice was extremely helpful and informative (by wumster)
what to use different programming languages for?
 
why would someone use different programming languages if they know how to do it in one? why would someone write the majority of a program in C++ and then have ...
[2 replies] Last: thanks again Moschops (by metulburr)
simple internet question?
 
Sorry another two questions on socket programming. 1) I was wondering why does the server need to bind() but the client doesn't? The server needs to bind so...
[6 replies] Last: right( if you dont need to mind - as it should be) (by Incubbus)
by judax
Smart Pointers and Exception handling
 
Dear all, I have looked over the internet and this thread looking for a complete answer of this situation I am facing. I have read that throwing smart p...
[1 reply] : No matter what the relation between template arguments is, the templat... (by hamsterman)
Initialising a vector in my structures constructor.
 
I have a c++ structure with an int vaulue and a vector. I want to initialise the int and the vector like so: struct MyStruct { MyStruct(int myInt...
[1 reply] : It must be m_VectorInt(1,VectorInt) Check the available constructors... (by Athar)
by mahkoe
File I/O with files sizes that are not a multiple of 8 bits
 
I am making a compression program, and in certain cases the resulting compressed file may not have an exact number of bytes, for example it might end up being 4...
[4 replies] Last: Okay, thanks everyone (by mahkoe)
finding the highest number
 
i am trying to make a program that asks the user to type 10 integers and writes the highest value but i can just write 10 integers. how can i do this ? please, ...
[7 replies] Last: Your compiler and IDE is very old. Chances are, it doesn't support ref... (by closed account zb0S216C)
I'm Having Problem converting 24 hour into minutes
 
the given entry time is 0830 the given exits time is 1300 i'm using turbo c++ i know using normal calculations i'm supposed to get 4 hours and 30 minutes ...
[5 replies] Last: thank you very much you all are great help thank you!!! this is just ... (by kilafan)
Creating a conversion between two data types
 
Say I create a class Complex that holds a complex number. A basic skeleton of it would be: class Complex { public: int Real; int Imag; }...
[3 replies] Last: In this example you need to add a constructor that matches how you are... (by Galik)
Stand alone Program
 
So here is the deal. My Grandfather has just recently gotten a new computer, he has been using the computer for several months but all of a sudden the mouse ha...
[3 replies] Last: Have a look here: http://support.microsoft.com/kb/259697 . I believe t... (by closed account zb0S216C)
by gmgo
Getting prime numbers from Openssl
 
We are working on a program to evaluate key-generation. What I need is to know how to get the prime numbers p & q OpenSSL uses to generate the keys, if possible...
[no replies]
General Ques.
 
if we have a class that handles bank accounts. and in the this class we have the same interest rate for all the account. double interestRate = 1.5; let u...
[no replies]
va_list in function with empty parameter list
 
I want to declare / define a function like this: void abc(...); I don't need any fixed part in the parameter list, but what do i pass to va_start as sec...
[4 replies] Last: Not a very nice solution, but it's working. I think that a nice sol... (by manasij7479)
by fsshl
can I input a fraction when input expect double?
 
dear c++ experts:(I am using g++4.6.1) when my input expect a double, can I use fraction number that can be auto calculated to be a double? I tried but it i...
[1 reply] : The short answer is No, you cannot. Want to support the feature? You... (by webJose)
by namcs
Array of list::iterator
 
Hi guys. I am trying to making an array of list::<PointObj>::iterator, so this is what I did: PointListIter* pointIterArr= (PointListIter*) malloc(1000*sizeof...
[4 replies] Last: That works, thank you. (by namcs)
what is the difference ?
 
Hi, what is the right impementation of operator* : rational operator*(const rational& r1, const rational& r2){ return rational(r1.p * r2.p, r1.q * r2...
[3 replies] Last: rational operator*(const rational& r2) const ; so it can work with ... (by ne555)
Command Line Arguments
 
Is it possible to access command line arguments with the C++ string class instead of a char array?
[2 replies] Last: You can do: #include <string> #include <vector> int main(int argc, ... (by Galik)
Release Error
 
I have a strange error. My debug build works well, but my release build crashes after succesful build. In my code: this->MaxFrames = MemAllocator.MaxFrame...
[19 replies] Last: Before 35 After 35 (by tolga gerekci)
September 2011 Pages: 1... 2526272829... 31
  Archived months: [aug2011] [oct2011]

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