Nope, it can't be a problem with the input file, because I copied the same information to each line, since it already worked.
Also, I'm not sure if I'm thinking of the right program debugger, but this program runs. It just doesn't do what it's supposed to.
Yeah, you see.... I have several problems when it comes to this stuff. I'm a 16 year old guy who's writing this program for my mom, who in turn will use it for her business, and I'll get a cut. Therefore, I supposedly can't post the entire code on this website. Also, my knowledge of C++ (which...
Sorry about the globals, but you got them right.
I tryed the "iTemp.seekg( 0 );", but it still doesn't seem to be working...
Is there a specific place to put the piece of code?
And, I was also wondering, is the code decent to do what it's supposed to do?
This function is supposed to read from an HTML file saved as "temp.txt"... Unfortunately, it doesn't work more than once running in a loop. I'm not very good at troubleshooting, but it looks like it isn't reading from the beginning of the fiel the second, etc, times... Can someone have a look...
Ok. I am transferring the method I use for a graphing calculator game I wrote over to C++. IMy only problem right now it getting the map to read...
Does anyone know why this doesn't work???
#include <iostream>
using namespace std;
int main()
{
int map[9][16] =
{
{ 1, 1, 1, 1, 1, 1, 1...
Is there a difference between me using ifstream and ofstream and you using istringstream and ostringstream?
The input you're using in that demo program isn't the same as what I'm using. I'm just wondering if that also makes a difference or not.
while (inFiletemp >> temp)
{
if (temp == '<')
num++;
else if (temp == '>')
{
num--;
if (num == 0)
inFiletemp >> temp;
}
else if (num == 0)
outFiletemp << temp;
}
This one's a laugh. If you compile it, it...
So, do you think that if I did it like this it would work?
while (inFiletemp >> temp)
{
if (temp == '<')
num++;
else if (temp == '>')
{
num--;
if (num == 0)
inFile >> temp;
else if (num == 0)...
Here's another version that uses a switch to fix the problem with the tags inside of tags. The only problem it has is how it deals with the '>'s. Just for kicks, compile this and look at the "temp.txt" file it creates. BTW : "sites.txt" contains two strings that are something like...
This program is supposed to remove the HTML tags from a downloaded HTML file. Here is the code :
#include <iostream>
#include <fstream>
#include <string>
#include <windows.h>
#include <wininet.h>
#pragma comment(lib, "wininet.lib")
using namespace std;
int main()
{
ifstream inFile;
ofstream...
I took a look at that, but I didn't see anything that would do what I need it to do. The closest time to what I need was once a day, but I need it to run every fifteen minutes. Are you suggesting that I setup a scheduled task for every fifteen minute interval?
The program takes info and stores it in a temp.dat file.
Information from a info.dat file determines what it reads.
Here is an example of this :
str0 str1 str2 str3 str4 //Row1
str5 str6 str7 str8 str9 //Row2
The strings in row1 determine what the program writes in temp.dat. After it...
I am now trying to write some code that reads and writes to files in a loop.
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream inFile;
ofstream outFile;
inFile.open("temp.dat");
.
.
//Grab strings
inFile.close()...
Okay. So what would I include for that if my code was something simple like this :
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main
{
ifstream inFile;
string webSite;
string str;
cin >> webSite;
inFile.open(webSite.c_str())...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.