Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when having spaces in device names #8

Open
il8677 opened this issue Mar 18, 2018 · 4 comments
Open

Error when having spaces in device names #8

il8677 opened this issue Mar 18, 2018 · 4 comments
Labels
bug Something isn't working urgent FIX NOW

Comments

@il8677
Copy link

il8677 commented Mar 18, 2018

No description provided.

@il8677
Copy link
Author

il8677 commented Mar 18, 2018

I can either sanatise all the spaces, or make it so that spaces are accepted

@il8677 il8677 added the enhancement New feature or request label Mar 18, 2018
@ghost
Copy link

ghost commented Mar 19, 2018

How does this happen? Shouldn't it just be a string attribute of the instance?

@ghost ghost added bug Something isn't working and removed enhancement New feature or request labels Mar 19, 2018
@il8677
Copy link
Author

il8677 commented Mar 19, 2018

When asked for the name of a fixture, it gathers straight from stdin, bun when doing this it only accepts 1 word. Then it moves on the the next line of code. Next time the program tries takin data from stdin, it won't wait for user input since there still is leftover from last time. This causes the problem of: it asks for a name, I the user puts in a name with a space, the program asks for the quantity of fixtures, spillover from user input causes quantity to be taken as part of user inputted name, which not only prevents there user from inputting a quantity, it also tries to store a string into an int var.

This could be solved either by using getline(). Or by flushing stdin after accepting one input, it is generally easier to go for the second option, but I still have not figured out how (I have tried)

@ghost
Copy link

ghost commented Mar 30, 2018

And this, kids, is why we all love C++.

@ghost ghost added the urgent FIX NOW label Mar 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working urgent FIX NOW
Projects
None yet
Development

No branches or pull requests

1 participant