General C++ Programming - February 2009 (Page 11)

how to convert from double to float?
 
hi, i've created this code to get the sin(x) value, but it keeps crashing my program when i run it. ...
[2 replies] Last: i was learning how to call the functions. i just changed all the doubl... (by deval90)
order of expression evaluation
 
hey can somebody please explain to me what is the order of evaluation of expressions in cout/printf ...
[3 replies] Last: On second thought, I think each of the arguments are evaluated as sepa... (by helios)
General question
 
In C++, if the user-defined function is placed before the #include<iostream> and using namespace st...
[2 replies] Last: The question is poorly defined. It doesn't say what interfaces the fun... (by helios)
by Nona
by reference or by value
 
can sombody please help me and explain to me what is the difference between: function1 (int x, in...
[1 reply] : Nona! go through this link http://www.tech-recipes.com/rx/1232/c-poi... (by skydbms)
casting
 
Is this a valid method to cast from hex to size_t? wordVector_ = (size_t)0xFF;
[1 reply] : Yes, but in C++ use static_cast instead size_t val = static_cast... (by jsmith)
piping to interactive programs hang?
 
Hi, I am doing a homework assignment that creates a shell to be used in a Unix environment. One of ...
[no replies]
[SOLVED]Passing a 2D Array Into a Function?
 
Hey guys quick question just wondering how to pass a 2d array into a function. Say if in a file I...
[2 replies] Last: I challenge you to come up with the correct syntax to return said arra... (by jsmith)
by SNOW
Key
 
I need help. I am making a game and it should work while ESC isn't pressed. The problem is how to do...
[1 reply] : You can use GetAsyncKeyState(VK_ESCAPE) from <windows.h>. GetAsyncKe... (by Scipio)
Is it possible to use the time.h to do this?
 
Alright so basically I want to know if it's possible to do something in the lines of: Get the cur...
[3 replies] Last: Yes, now I see what you want :) I would make the time of seconds si... (by Scipio)
antivirus software
 
hello all i need to program an anti virus software .can u please tell me how i can go about doing...
[1 reply] : If your looking at programming a "whole" antivirus software... You'd b... (by Mythios)
linking file stream with input file in C?
 
ok i was given an assignment but i have no clue how to do this. can someone please explain to me wha...
[3 replies] Last: Use the code formatting option to make you code more readable [c ode... (by guestgulkan)
Classes and DLLs
 
If I'm not mistaken, DLLs only store code. Just functions. Then how can class information be hidden?...
[7 replies] Last: Okay. I understand. Thanks :) (by Tom Backton)
Access violation reading from text file
 
Hello all, I have written a program to read strings from a text file. The text file is very brie...
[2 replies] Last: You maybe mis-interpreting the what you see. Those funny characters a... (by guestgulkan)
STL list random iterator
 
class A is a user defind class. if I have list<A*> in my code as follows. list<A*> m_lstAList; ...
[3 replies] Last: You could make a function to do it. template< typename Iterator ... (by jsmith)
How do I cast char array into childclass without breaking vtables?
 
I made a general memory manager that takes the size of any datatype and allocs a char * to that size...
[6 replies] Last: Ok, but be aware that you will not be running any constructors or dest... (by jsmith)
Type casting and function parameters
 
Let's say I have a function that takes a parameter of type unsigned char, does some calculations and...
[17 replies] Last: In other words, the conclusion is: for variables or small arrays it's ... (by Tom Backton)
by fire
Usage of mutator methods
 
Hi all! I don't really know whether this is a "Beginner's question" but maybe it is ,..well, if s...
[1 reply] : Personal preference. It is not more expensive if the methods are non-... (by jsmith)
how to keep the input order while inserting in multimap
 
I wanted to maintain the input order while inserting data to a multimap. my key is a int , and val...
[3 replies] Last: Probably because he needs to at one moment get the elements based on t... (by helios)
Accessing members of parent class
 
Hi all, I have a class A and class B. Class B inherits from A. Class A has a protected member x. ...
[2 replies] Last: Sorry, it was a silly mistake! Actually member x was a vetor<int> typ... (by kunigami)
define classes with vectors?
 
is this possible or desirable ever? this is sort of an open question for instance, if i had a ...
[3 replies] Last: If you create a struct containing the data, you will not be able to us... (by jsmith)
February 2009 Pages: 1... 91011121314
  Archived months: [jan2009] [mar2009]

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