Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories

when running program it has me enter two lines after name? help please

There's no need for cin.ignore(); Simply write it as:

Speaker *getSpeaker()
Speaker *theSpeaker;
theSpeaker = new Speaker;
cout << "Please enter Speakers information"
<< endl;
cout << "name: " ;
getline(cin, theSpeaker->name);
cout << theSpeaker->name;
cout << "
phone number: ";
cin >> theSpeaker->phoneNumber;
cout << "
Email Address: ";
cin >> theSpeaker->emailAddress;
cout << "
Theme: ";
cin >> theSpeaker->theme;
cout << "
Fee: ";
cin >>theSpeaker->fee;

return theSpeaker;

Categories : C++

Related to : when running program it has me enter two lines after name? help please
My c program should be running in several threads using openmp but it isn't
I guess there are only two possibilities for the issue. shared_data->sh_rct == 1. In this case, there is nothing to run in parallel. OpenMP runtime was told to limit the number of threads to only one. The later can be caused by: Prior call to omp_set_num_threads(1) OMP_NUM_THREADS environment variable set to 1 Prior call to omp_set_dynamic(1) or OMP_DYNAMIC=TRUE in some cases might cause

Categories : C
Java kill program if already running
As mentioned in the comments, the command will also kill the new instance. There are ways around it, like creating pid files to ensure only one instance is running. But that probably doesn't matter, because there are better ways to do the same. Please check How to implement a single instance Java application and How to allow running only one instance of a java program

Categories : Java
Running a program where I pass the filename into Main
Look at the signature for you main procedure. It should look like int main(int argc, char* argv[]). The argc parameter holds the number of arguments including the filename of your program. argv is an array of null-terminated strings holding the arguments. The second one (index 1), if it exists, is likely what you're looking for. What are you getting there? It looks like you're already using those

Categories : C
Display an information message while the program is running
You didn't say what GUI framework you're using, so I'm going to assume Forms. WPF would be similar though. Let's assume the work begins when you click a button named "button1". Create a Form subclass that is your message (called, for the sake of example, "MessageWaitForm"). Then you can use it like this: private void SomeWork() { for (var i = 0; i <3504 ; i++) for (var j = 0; j &l

Categories : C#
checking per ssh if a specific program is still running, in parallel
The following lets all connections complete before starting any in the next batch, and thus can potentially wait for more than 30 seconds -- but should give you a good idea of how to do what you're looking for: hosts=( host1 host2 host3 ) user=someuser script="script you want to run on each remote host" last_time=$(( SECONDS - 30 )) while (( ( SECONDS - last_time ) >= 30 )) || sleep $(

Categories : Bash
Recently Add
C++: error C2143: syntax error : missing ';' before '<'
Converting 2s compliment to a decimal. Output is double
how do you compare a string to a vector value?
Converting a long double to double with upward (or downward) rounding
C++: operator<< overloading in the nested classes
Unclear behavior with csv processing using getline
C++ Visual Studio Error: IntelliSense: expected a statement
Game of Nim - showing the remaining numbers and letting a player pick their name?
malloc 1D array in struct
How to create an array of smart pointers?
c++ swapping unique_ptr's
Functions as arguments
Any Fast & Efficient way to generate a 3D Grid?
Is string[] not a type?
C++ typeid(x).name() returns ph
Counting / Printing Path - From (1,1) to (m, n)
C++ input function that calls itself
Error: array must be initialized with a brace-enclosed initializer
SDL_ConvertSurface() causes break
C++ std deviation function?
libcURL Progress Function not being called
What is QList's maximum size?
Run batch with C++
Read a file and write its contents to another C++
extract from stringstream into 2D vector
How to stop Scons adding lib infront of a shared library
Blocking vs non-blocking mode in TCP sockets using C++
SDL2 toggle SDL_WINDOW_RESIZABLE state for fake fullscreen
How can I assign value to specific vector's index?
Operator Overloading with Constant Iterators
© Copyright 2017 Publishing Limited. All rights reserved.