Sponsored Content
Full Discussion: why won't this Work?
Top Forums UNIX for Dummies Questions & Answers why won't this Work? Post 44509 by mbabeli on Monday 8th of December 2003 06:10:24 AM
Old 12-08-2003
thanks for the replay.

the second question is actually a C++ question, i should have mentioned that before, the compiler i am using is gcc, not g++(which i use for q2 or C++ programs). and when i pass it as an argument i mean==>
if (.......){ while (getc(.....)!=NULL){ do something; } }

P.S: what about <fstream> isn't it a C standard library?

and thanx in advance.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Ksh Why Won't IF Statement work?

I'm trying to figure out why this if statement won't work: if || $zipcount != 6 ]] then echo ${myline} echo "ZIPCODE WARNING! ${zipcode} ${zipcount}" fi if ]] then echo ${myline} echo "STATE WARNING!... (3 Replies)
Discussion started by: developncode
3 Replies

2. UNIX for Dummies Questions & Answers

sed won't work

Hi All, can anybody tell me what's wrong with this code? # SEARCH replaced by REPLACE #!/bin/bash SEARCH="95$$ 0 t" REPLACE="95$$ 1 t" for I in `ls *000.inp | cut -c-12`; do echo $I sed 's/$SEARCH/$REPLACE/' ${I}-000.inp > ${I}-100.inp done It don't replace the string... (5 Replies)
Discussion started by: f_o_555
5 Replies

3. OS X (Apple)

Why won't the at command work in Mac OS X?

I typed: echo "echo hi > at_log.txt" | at now +1minute to test the at command on my terminal. I got the message: job 8 at Thu Feb 25 18:42:00 2010 I waited for a minute but nothing happened. I tried listing at_log.txt, but it said there was no such file. Am I doing something... (2 Replies)
Discussion started by: Ultrix
2 Replies

4. UNIX for Dummies Questions & Answers

A very simple script, but alias won't work

I am new to unix and therefore I did a lot of reading before posting. So please, if this has been answered before, forgive me for re-posting and point me to the right place for the answer. I have spent many hours searching the net and read over 50 posts in this forum and even tried a few thing but... (20 Replies)
Discussion started by: sssccc
20 Replies

5. UNIX for Dummies Questions & Answers

OpenSolaris, Wireless won't work, help please!

I just installed a fork of opensolaris, and I really like it. I would hate going back to Ubuntu, But one issue, I cannot get my Dell Wireless 1450 Wireless USB Adapter working. On Ubuntu 10.4 I just installed nonfree firmware, but I guess it doesn't work that way on Solaris, any help would be... (5 Replies)
Discussion started by: Stormos
5 Replies

6. Solaris

string extraction won't work. Why?

#!/usr/bin/ksh set -x testfile=my.test.file.flag echo ${testfile: (-4)} #/home/maldohe/scripts/spawn1& sleep 3 echo myspawn is now ending exit Background: I am trying to extract the word flag from anf given file name. This is a demo script that I am working on to fix a production issue.... (8 Replies)
Discussion started by: Harleyrci
8 Replies

7. BSD

Install cd won't work

Hi! I'm sure that somebody here installed freeBSD from a download of a virtual disc (.iso). But I made 5 downloads of 5 differents freeBSD installation (and no one has worked).Can somebody tell me where to download and how (if needed) to prepare the cd? (8 Replies)
Discussion started by: maxum
8 Replies

8. UNIX for Advanced & Expert Users

pkill won't work on firefox anymore

Can someone tell me why pkill won't work on firefox anymore? (11 Replies)
Discussion started by: cokedude
11 Replies

9. UNIX for Dummies Questions & Answers

Images won't work?

Hello, Images won't work on UNIX when I try posting them on my website I'm working on. It doesn't show the image, and it's simply erroring. Help! Thanks! (5 Replies)
Discussion started by: yazan
5 Replies

10. IP Networking

NAT via iptables - Won't work!!

Hi guys I'm running on debian on a small embedded system. I have a ppp interface that is connected to the internet (and works). My unit also has wifi access point (which works and I can connect to it). I want to allow connections to the wifi to be able to use the internet from ppp0... (1 Reply)
Discussion started by: alirezan1
1 Replies
gethrtime(3C)						   Standard C Library Functions 					     gethrtime(3C)

NAME
gethrtime, gethrvtime - get high resolution time SYNOPSIS
#include <sys/time.h> hrtime_t gethrtime(void); hrtime_t gethrvtime(void); DESCRIPTION
The gethrtime() function returns the current high-resolution real time. Time is expressed as nanoseconds since some arbitrary time in the past; it is not correlated in any way to the time of day, and thus is not subject to resetting or drifting by way of adjtime(2) or settime- ofday(3C). The hi-res timer is ideally suited to performance measurement tasks, where cheap, accurate interval timing is required. The gethrvtime() function returns the current high-resolution LWP virtual time, expressed as total nanoseconds of execution time. The gethrtime() and gethrvtime() functions both return an hrtime_t, which is a 64-bit (long long) signed integer. EXAMPLES
The following code fragment measures the average cost of getpid(2): hrtime_t start, end; int i, iters = 100; start = gethrtime(); for (i = 0; i < iters; i++) getpid(); end = gethrtime(); printf("Avg getpid() time = %lld nsec ", (end - start) / iters); ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
proc(1), adjtime(2), gettimeofday(3C), settimeofday(3C), attributes(5) NOTES
Although the units of hi-res time are always the same (nanoseconds), the actual resolution is hardware dependent. Hi-res time is guaran- teed to be monotonic (it won't go backward, it won't periodically wrap) and linear (it won't occasionally speed up or slow down for adjust- ment, like the time of day can), but not necessarily unique: two sufficiently proximate calls may return the same value. SunOS 5.10 7 Sep 2004 gethrtime(3C)
All times are GMT -4. The time now is 02:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy