User Profile

Collapse

Profile Sidebar

Collapse
RajendraNPTL
RajendraNPTL
Last Activity: May 14 '13, 11:14 AM
Joined: Mar 13 '13
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • RajendraNPTL
    replied to timer for getline() function
    in C
    -donbock
    ha ha.. main problem is that only.. if i have a proper function to return immediately, i never go for threads and alarm and timers all these. okay you came to my point. Now give your ideas about immediate returning(atlea st 2 sec) from getline() either with a success or failure .. ??
    thanks
    See more | Go to post

    Leave a comment:


  • RajendraNPTL
    replied to timer for getline() function
    in C
    thank you -weaknessforcats
    i already got the solution using <pthreads>
    Now, i dnt want to use that. is there any other way to solve the same problem ..?? Challenging one... !!

    thanks
    See more | Go to post

    Leave a comment:


  • RajendraNPTL
    replied to timer for getline() function
    in C
    -weaknessforcats
    Exactly... but, not in wait. In that 5 sec time it needs to go to some other function and come back to the same getline(). Then with in 5 sec if i not entered any string, then again it has to got to that function and come back (looping)..
    Main purpose is__ Timer for getline(), with in that time it needs to execute another function and come back .. any ideas ??
    thanks
    See more | Go to post

    Leave a comment:


  • RajendraNPTL
    replied to timer for getline() function
    in C
    thnq suvarna.. it worked well.
    But, at last it is giving one message "Alarm clock". How to suppress that one ??? and also if i want to do another task after 5 sec with exiting from program.. is this one also possible ??
    -suvarna271
    See more | Go to post

    Leave a comment:


  • RajendraNPTL
    started a topic timer for getline() function
    in C

    timer for getline() function

    hiii all
    i want to read a string from commandline through getline() in c++. For that i want to add a timer of 5 sec. If no string read, then the program will terminate. can anybody know ?? I am using Centos 6.3
    thanks
    See more | Go to post

  • RajendraNPTL
    replied to how to know commandline is empty or not ??
    in C
    Thank you @weaknessforcat s
    My program is running. The actual thing is that i want that the control have to do multiple tasks in my program. if i enter data in commandline and hit enter it wanna go to send function, read data and send. If i am not typing anything then it will be in receiving mode..( Like chat program). For this one i don't want to use threads, bcozz program becomes complex. that's why i questioned about commandline. Is there...
    See more | Go to post

    Leave a comment:


  • RajendraNPTL
    replied to how to know commandline is empty or not ??
    in C
    thank you soo much @Banfa
    But, is there any equivalent method in c++, like CommandLine BufferedReader in java ????
    See more | Go to post

    Leave a comment:


  • RajendraNPTL
    started a topic how to know commandline is empty or not ??
    in C

    how to know commandline is empty or not ??

    hello.. everyone
    i am writing a c++ program in Linux..
    i am reading a line from commandline at run time using "getline(std::c in,str);". now, what i want is if i left the commandline as idle (terminal as idle), then i want to know that the commandline is empty... is it possible ???
    any comment is appreciable..

    thank you
    See more | Go to post
No activity results to display
Show More
Working...