Delete last row

  • (2 Pages)
  • +
  • 1
  • 2

16 Replies - 332 Views - Last Post: 06 February 2018 - 02:35 PM Rate Topic: -----

#1 Lolz24  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 06-February 18

Delete last row

Posted 06 February 2018 - 01:42 AM

Hi!

I want to make a program so I can delete the last written row to fill it back with other things.
I guess that it might employ coordinates, and I don`t know how to use them either.
If you can tell me some basics in coordinates I would appreciate a lot.

Thanks!
Is This A Good Question/Topic? 0
  • +

Replies To: Delete last row

#2 ndc85430  Icon User is online

  • I think you'll find it's "Dr"
  • member icon

Reputation: 703
  • View blog
  • Posts: 2,880
  • Joined: 13-June 14

Re: Delete last row

Posted 06 February 2018 - 11:29 AM

You're really going to need to provide more details. What row? Fill it with what? Where does this data come from? How have you thought about breaking this problem down? Give as much information as you think will be helpful.

This post has been edited by ndc85430: 06 February 2018 - 12:33 PM

Was This Post Helpful? 0
  • +
  • -

#3 Lolz24  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 06-February 18

Re: Delete last row

Posted 06 February 2018 - 12:31 PM

for example i read an char, then i delete the row where i wrote the input to say good things about the choice:
cin>>x;
//code to delete the row
cout<<"Player 1 chosed "<<x;


Was This Post Helpful? 0
  • +
  • -

#4 ndc85430  Icon User is online

  • I think you'll find it's "Dr"
  • member icon

Reputation: 703
  • View blog
  • Posts: 2,880
  • Joined: 13-June 14

Re: Delete last row

Posted 06 February 2018 - 12:39 PM

Are you asking about how to clear lines on the terminal? If so, that's going to be OS specific, so which OS are you using? If not, please clarify.
Was This Post Helpful? 0
  • +
  • -

#5 Lolz24  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 06-February 18

Re: Delete last row

Posted 06 February 2018 - 12:50 PM

Im actually a noob in programming, began 1 month ago, im using code blocks on windows 10. I don`t know what you mean 'OS'
Was This Post Helpful? 0
  • +
  • -

#6 ndc85430  Icon User is online

  • I think you'll find it's "Dr"
  • member icon

Reputation: 703
  • View blog
  • Posts: 2,880
  • Joined: 13-June 14

Re: Delete last row

Posted 06 February 2018 - 12:53 PM

Operating system. I don't know anything about Windows, so I'll leave someone else to answer this. If you're new to programming though, this isn't the sort of issue that should be important to you right now. Your focus should be on learning how to use your language to solve problems. You do that by writing lots of simple programs that use what you get with the language and its standard library.
Was This Post Helpful? 0
  • +
  • -

#7 Lolz24  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 06-February 18

Re: Delete last row

Posted 06 February 2018 - 12:55 PM

Alright, at least i hope you can give me an litlle teach about coordinets in console?
At least a sample of a program related to the subject?
Was This Post Helpful? 0
  • +
  • -

#8 ndc85430  Icon User is online

  • I think you'll find it's "Dr"
  • member icon

Reputation: 703
  • View blog
  • Posts: 2,880
  • Joined: 13-June 14

Re: Delete last row

Posted 06 February 2018 - 12:56 PM

I don't know what you mean by "coordinates in the console".
Was This Post Helpful? 0
  • +
  • -

#9 Lolz24  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 06-February 18

Re: Delete last row

Posted 06 February 2018 - 01:18 PM

What i really want to do is a program with autofill. A player introduce a letter, it automatically shows an option, and if the player wishes to change the choice he/she will press the delete button and the recommendation disappears. The part I have problems with is to delete the recommendation.
Was This Post Helpful? 0
  • +
  • -

#10 ndc85430  Icon User is online

  • I think you'll find it's "Dr"
  • member icon

Reputation: 703
  • View blog
  • Posts: 2,880
  • Joined: 13-June 14

Re: Delete last row

Posted 06 February 2018 - 01:24 PM

As I suggested before, that's probably going to need a third party library as I don't think the C++ standard library has facilities that will help you do this. I don't tend to build text based UIs, so I am happy to be corrected on this.

Again, if you haven't been programming that long, using external libraries is not going to be trivial for you and you're better off focusing on learning the language.

This post has been edited by ndc85430: 06 February 2018 - 01:26 PM

Was This Post Helpful? 0
  • +
  • -

#11 Lolz24  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 06-February 18

Re: Delete last row

Posted 06 February 2018 - 01:30 PM

I saw an program clearing the entire console using windows.h

But the chances are low to not use a third party library, indeed, i lost the code anyways.
Was This Post Helpful? 0
  • +
  • -

#12 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 13765
  • View blog
  • Posts: 54,941
  • Joined: 12-June 08

Re: Delete last row

Posted 06 February 2018 - 01:30 PM

So..
system("cls");
?
Was This Post Helpful? 0
  • +
  • -

#13 Lolz24  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 06-February 18

Re: Delete last row

Posted 06 February 2018 - 01:32 PM

i know this function already, i want it to delete the last terminal.
Was This Post Helpful? 0
  • +
  • -

#14 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 13765
  • View blog
  • Posts: 54,941
  • Joined: 12-June 08

Re: Delete last row

Posted 06 February 2018 - 01:33 PM

Why not clear the screen and just print out what you need. Typically suffices for most homework that need that route.
Was This Post Helpful? 0
  • +
  • -

#15 Lolz24  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 06-February 18

Re: Delete last row

Posted 06 February 2018 - 01:35 PM

the whole thing is about keeping previously made actions
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2