Search Results

Showing results 1 to 15 of 15
Search took 0.00 seconds.
Search: Posts Made By: nanodano ; Forum: C and child forums
Forum: C Apr 6th, 2007
Replies: 1
Views: 1,498
Posted By nanodano
When programming with pthreads, you pass the thread a function to run when you create it. When this function is done, is the thread cleaned up automatically? Is it necessary to put pthread_join() in...
Forum: C Nov 20th, 2006
Replies: 3
Views: 1,673
Posted By nanodano
Thank you, I found out our mainframe does have it already.
Forum: C Nov 19th, 2006
Replies: 3
Views: 1,673
Posted By nanodano
Does anyone know where I can find the pthread library for Linux? And I don't want any rude "go google it" responds. I tried that, and all I came up with was one download available for win32.
Forum: C Nov 7th, 2006
Replies: 26
Views: 4,648
Posted By nanodano
You use list = names which assigns names to list in your code. You may mean to have that switched. Also, why not read directly into names? I am pretty sure your dispute between 1 and 2 dimensional...
Forum: C Nov 7th, 2006
Replies: 26
Views: 4,648
Posted By nanodano
Acquire,

The first thing I noticed was this char names[99][28]= {" "};. If you get an error with that line, try using single quotes instead of double quotes. Double quotes are associated with...
Forum: C Jun 8th, 2006
Replies: 0
Views: 3,638
Posted By nanodano
This snippet shows how to use command line arguments as variables in your program. A command line argument is extra information you give a program at runtime, by typing the information after the...
Forum: C Jun 1st, 2006
Replies: 0
Views: 7,220
Posted By nanodano
I've been looking for information on threading, and I found information on POSIX pthreads. Apparently, Visual Studio 2005 does not have pthreads.h in their library. I did a search on the computer,...
Forum: C Jun 1st, 2006
Replies: 1
Views: 926
Posted By nanodano
Hi,

Let me explain a little background of the situation in case there is a wiser solution than vectors. I've got a loop running in a program, and for each loop, I need to add a new element at...
Forum: C May 25th, 2006
Replies: 5
Views: 19,005
Posted By nanodano
Introduction

Hello everyone. This little code snippet shows you how to read in scan codes from the keyboard. It is slightly different than reading in a regular character. When you use the getch()...
Forum: C May 24th, 2006
Replies: 4
Views: 2,419
Posted By nanodano
To get the address of the pointer depends on how it was initialized.

If it was initialized as a pointer:

int* int_ptr;


To send the address to an ostream just use out << int_ptr;

If...
Forum: C May 24th, 2006
Replies: 3
Views: 15,064
Posted By nanodano
To use the time as the seed is very simple.

Make sure you include the <ctime> header.


#include <ctime>


Then, inside ctime there is a function you can call like this:
Forum: C May 18th, 2006
Replies: 9
Views: 8,333
Posted By nanodano
Well,

I suppose a solution to that would to declare one variable as a pointer and one as an int.

Maybe something like:



int hello;
int *hello_ptr;
Forum: C May 18th, 2006
Replies: 9
Views: 8,333
Posted By nanodano
How is that hiding a problem vs a solution? I agree that removing the * and not letting hello be a pointer is changing something. Casting hello (which is declared as an int) to an int isn't changing...
Forum: C May 18th, 2006
Replies: 9
Views: 8,333
Posted By nanodano
Hey,

I found a solution!

Simply force type-cast it as an int.


switch(int(hello))
Forum: C May 17th, 2006
Replies: 9
Views: 8,333
Posted By nanodano
The problem is with the hello variable.

When you write


int *hello;

// What you're saying is create a pointer called hello.

// When you write
Showing results 1 to 15 of 15

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC