I don't want to Open a file, I want to write it, the Input variable will be the name of it.
Type: Posts; User: Apocalyptic_end
I don't want to Open a file, I want to write it, the Input variable will be the name of it.
Ok... so where do I put that code in my program and what code do I merge?
Ok, for the "For" loop you asked why it isn't 2 leveled, I presume by level you 2 you mean 6 spaces after the "F" in for, since each level is 3 spaces. I did this aswell for the "If" statement.
Ok. So where would I go to try to learn this. I've googled it and I couldn't find it.
Oh. I knew I forgot something. I just did, I guess I made a mistake.
Here's the improved version:
#include <stdio.h>
#include <fstream>
#include <iostream>
using namespace std;
Here's my 2 codes for asking a users name and writing a file:
User Name input:
#include <stdio.h>
#include <fstream>
#include <iostream>
using namespace std;
Yeah. Well, I didn't read rule one, so I didn't realise the whole thing about blocks. Here's my new code:
#include <stdio.h>
#include <fstream>
#include <iostream>
using namespace std;...
Oh well I'm using Dev-C++ and it says it says 13:3 and I know the (Well I thought) the 3 meant 3 spaces. So I guess I was wrong. Thanks for the help.
Hello all!
I want to ask the user a question and when the user answers it makes a file with the name of the answer I.E:
"What is your name?"
User inputs "Fred"
Then a text file with the...
Here is my code, each level consists of 3 spaces:
#include <stdio.h>
#include <fstream>
#include <iostream>
using namespace std;
void myflush(std::istream& in)
{
No I get it, I made a mistake by thinking that each level was 4 spaces, not 3, Let me try it again. I also presume by you putting a "!" after the level 0 indentation, I should make it a level 1...
What about now?
#include <stdio.h>
#include <fstream>
#include <iostream>
using namespace std;
void myflush(std::istream& in)
{
Yeah ok, but where are my levels inconsistent?
I don't really get it at all, what are indentation levels?
Yeah... I did read it... I'm just a little bit confused
Hooray! I figured it out! I opened the Dev file instead of the CPP File.
Is this better indenting?
#include <stdio.h>
#include <fstream>
#include <iostream>
using namespace std;
void myflush(std::istream& in)
{
Ok. I see we are talking about talking to different things, I think. I want the 7 numbers to show up in the Example.txt file and not just in the program when I run it.
When I run the program I...
Yes. I'm sure. I've Compiled it multiple times. Ran it many times with the same affect.
In Example.txt it only repeats the last of my 7 Random_integer numbers. I want all of them to be shown.
Well... I've fixed my indentation and Moved some of my Text Writing code:
#include <stdio.h>
#include <fstream>
#include <iostream>
using namespace std;
void myflush(std::istream& in)
{
Hello. Let's start with my code:
#include <stdio.h>
#include <fstream>
#include <iostream>
using namespace std;
void myflush(std::istream& in)
{
Ok. Thanks for your help.
Here is my code:
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <stdio.h>
using namespace std;
void myflush(std::istream& in)
Ok. Thanks alot.