No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
With the following line I get a syntex error relating to the ifstream file [code]if ifstream file(filename.c_str()).find string1 ++counter;[/code] I have already declared the input file and do not understand why there is an error. Sorry for seeming dumb but I am new to this!! |
|
The following code is not performing correctly. It opens the username file but does not display the mark. [code]#include <cstdlib> //these commands are pre processors directive #include <fstream> //required for library function #include <iostream> #include <cstring> #include <string> using namespace std; int main() { cout << "Marking Program"<<endl; string username; … |
|
The following program executes without any errors, but the output is not what is expected. The code is correct down till the opening of the MarkScheme.txt file, but the student mark is not displayed on the screen, any thoughts [code]#include <cstdlib> #include <fstream> #include <iostream> #include <cstring> #include <string> using … |
|
When trying to build me program the error message [COLOR=Red]LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16 Debug/Marking Program.exe : fatal error LNK1120: 1 unresolved externals[/COLOR] occurs. I am not sure why this happens, any thoughts |
|
I am having trouble trying to merge 2 strings into 1. Is this possible if so how is it done? |
|
I am having a problem with inputs. I can get the input using the cin command but i want to use the input to open a file with the inputs name ie the user types in FRED. cin>>name i want to open a file called fred.txt ifstream in("name.txt"); the above … |
|
This is my first attempt at creating a program and I am having great problems. The program is meant to scan a file and increment a counter if specific words are found. Can anyone let me know where I'm going wrong,Thanks #include <iostream> #include <fstream> #include <string> #include <iomanip> #include … |
|
How do I use use a string that has been entered by the operator to search an input file for the same string to appear? i think i use string find but not sure |
|
I am creating a program that automatically inputs a file into it simply by the user entering a name. the program then marks the file by incrementing a counter everytime a key word is found. I think is can be done by string find but i'm not sure how to … |