First  |  Prev |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
langurage is difficult
langurage is difficult ... 9 Jul 2008 00:23
Access variables define in a function in another function?
Is is possible to have variables that are defined in a function accessible in another function? I'm working on a program that makes calls to several (user defined) functions. I would like to access some of the variables defined in the first function for use in the second one, but I'm not sure how to do that... 10 Jul 2008 12:22
Include decimal point in floating point values?
I know this is pretty basic, but is there any difference between: double x = 3.0; double y = x/4.0; and double x = 3; double y = x/4; ? In other words, if I don't include a decimal point when using a whole number in a type double expression, as in the second case, does the compiler assume it's an... 8 Jul 2008 19:16
cot, sec, csc?
Are cot, sec, and csc not a standard part of the math.h? It appears that way, but just wanted to double check before defining them in my code. Thanks. Pat ... 13 Jul 2008 11:00
One way hash?
I think what I need is a one-way hash, but I am not sure? I need to "convert" a string into a "unique" integer (or very low risk of collision, it doesn't have to be perfect), in a C-like language that does not have pointers! First, is what I am looking for called a one-way hash? Second, does anyone have an a... 4 Jul 2008 07:57
newbee Q: simple problem
I have strings (start and cont) and numbers (0,1,2,3....) Each string has a number. once the string started ( with its number) it becomes a line until new Start string occures for a defined numer. i.e. start 0 , L1 cont 0 , L1 cont 0 , L1 start 1 , L2 cont 1 , L2 cont 0 , L1 start 0 , L3 cont 0 , L3... 7 Jul 2008 01:15
Extract directory from filename
I need to extract the directory portion from a filename string (e.g. c:\foo\bar.txt). I came across the following splitpath function through a bit of searching around. I figured that the second and third parameters are pointers to character arrays which will be filled when the function returns. But I can't u... 4 Jul 2008 16:09
Problems with Visual Studio + SDL + std::vector
I know I'm pushing my luck asking a question about a specific compiler and an API, but I've had a lot of help from this n.g. in the past and moreover, from what is written elsewhere, there is no obvious solution. The problem is that it does not appear to be able to link code that uses Simple DirectMedia Layer ... 3 Jul 2008 05:19
ACPP Exercise 4-2
I'm having trouble with Exercise 4-2 in Accelerated C++. The exercise is "Write a program to calculate the squares of int values up to 100. The program should write two columns: The first lists the value; the second contains the square of that value. Use setw to manage the output so that the values line up in col... 2 Jul 2008 18:05
help needed with void pointers.
Hi, I'm trying to create a generic link list. Here's the data structure for node: Code: typedef struct node_s { void *data; struct node_s *next; }node; Now let's say I want the data pointer to point to a vector structre: Code: typedef struct { double coord[3]; }vector; I can assign d... 1 Jul 2008 06:10
First  |  Prev |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18