-1

what I'm trying to do with this code is to create a bot that automatically downloads a file when it read a discord message (that part is not done yet) but I want to save the download button position variable (mouse down position) into a text file and make it read but I don't know how to create an input/output text file from c++

bonus: if you want could you tell me how to make c++ read a discord message from a specified user

M1S0
  • 29
  • 7
  • Read this before posting a question. https://stackoverflow.com/help/how-to-ask – Sunny Jul 04 '17 at 12:37
  • 2
    If you don't know how to open and read or write files in C++, then I suggest you take a few steps back, [get a good beginners book](http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list), and start from the beginning. – Some programmer dude Jul 04 '17 at 12:38

1 Answers1

-1

though your question is not clear, but if you want to run your file as a cpp file then you could save your file with .cpp extension.

SSM
  • 84
  • 2
  • 12
  • actually, i think I misspelled things wrong what I'm trying to do is to save a variable (containing a mouse coordinates) in a txt file so it does not reset every time the program restart (actually the program must get the cursor position, write it down into a txt file then the next time it starts it read that txt file coordinates and knows where to click ) – M1S0 Jul 05 '17 at 21:50