- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
16 Posted Topics
this definitely does not seems to be problem with c++ code
are you trying to learn C++?? or trying to code for some project??. Reason I ask is you can use lot of inbuilt methods to do such conversion
what is the question / problem? you just explained some piece of code here and not mentioned anything else....
yes, if you never expect to hold any negative values you better change the data type to int from unsigned int. This will solve the problem. This way it will only take values from 0 - 65565 (approximately)
can some one tell me what was the problem and how it is solved,from the posts I understand that its solved, but how I am not sure
hmm, that seems to be a broad prespective of information you are asking. How far are you familiar with any programming language (C / C++ / JAVA)? if you are not familiar then you should take a tutorial and get familiar with it first. if you are then here is …
This can be done is 2 ways. 1. one way is to copy the args values to local array variable and pass this new array to method. 2. Second way is to directly pass the args to method
that is one way of doing it. But in the example (by SgtMes)you are not handling objects. Here is how you can do this. [CODE]class hello { . . . } main() { hello *ha[5]; ha[0] = new hello(any parameters you declare); ha[0]->method1() ha[1] = new hello(any parameters you declare); …
what is the kind of problem you are facing with that code??? :icon_question:
I agree with both the answers. If you do not want destructor to be called twice then copy the object and see the difference.
try this, might help [url]http://flylib.com/books/en/2.236.1.97/1/[/url]
I too agree with waltP, as I really do not understand what the requirement is
I really do not understand your situation of using the code. Do you have multiple methods with same name (over loaded constructors for the class) If so then that should take care of the problem. If this is not the case then forget about exception handling at run time, you …
or do like this # int main() # { # //write a book! # book dune("dune", "scifi", 1965, 1021); . . . .
I think you cannot call a variable that is defined in other file atleast. This will be out of scope error or variable not defined message you can expect. So check out for scope before using it. Even if you place the main in .cpp file you cannot use it …
Hi All, this is my first query after joining the forum. I would like to know following points: 1. If I can create threads in constructor 2. If yes, can I use the same object / instance (which created this thread)in this thread to call other methods of the class …
The End.
geethasree