15,919,028 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Vishal Banerjee (Top 17 by date)
Vishal Banerjee
21-Nov-18 4:50am
View
Thank you very much for the code help and support but I want to mention here that I am unable to check this code as my compiler is not supporting this feature.
Vishal Banerjee
19-Nov-18 5:12am
View
Sir please reply.
Vishal Banerjee
18-Nov-18 6:26am
View
Sir,
I have found a serious issue in this code so I am rejecting the solution for now but once it is solved I would soon accept it.
The problem is when I am searching for a word like "Cat" words like "Cataract" and all other words beginning with "Cat" are also coming as output. Please solve this out.
Vishal Banerjee
18-Nov-18 3:19am
View
Sir I have a doubt regarding the code:-
I am not getting the point ""std::string candidate;""
please explain.
Vishal Banerjee
17-Nov-18 5:09am
View
Sir the problem has been solved thank you very much.
Vishal Banerjee
17-Nov-18 4:52am
View
Thank you Sir for your response the code is now working but I am not getting the format of entering the "path" in the output screen. Please help.
Vishal Banerjee
16-Nov-18 5:09am
View
Sir, I am use turbo c++, Dev c++ and code blocks 16.01 only pls try to make the code compatible accordingly.
Vishal Banerjee
15-Nov-18 5:19am
View
Sir the code provided by you is having error in its first line only the first header file is not supported by the compiler.
Vishal Banerjee
15-Nov-18 3:11am
View
Sorry Sir I am unable to understand the solution.
Vishal Banerjee
9-Nov-18 1:46am
View
I have solved the problem by myself thank you for your suggestions and concern.
Vishal Banerjee
7-Nov-18 5:48am
View
Here is the modified code :-
#include <iostream>
#include <fstream>
#include <cctype>
using namespace std;
int main()
{
string word;
cout<<"Enter the word to be searched in the dictionary :- ";
cin >> word;
word[0] = toupper(word[0]);
string path = string("D:/") + word[0] + ".txt";
ifstream ifs(path);
int count = 0;
while ( ifs )
{
string line;
getline( ifs, line);
if ( line.find(word) != string::npos)
cout << word << " found inside line " << count << "\n";
++count;
}
}
Error at line 17 pls check:-
|17|error: no matching function for call to 'std::basic_ifstream<char>::basic_ifstream(std::string&)'|
Please help.
Vishal Banerjee
7-Nov-18 3:25am
View
It is not a compiler the compiler is to be loaded and then configured which is a time taking work, the process is also a lengthy work .Pls provide me suggestions on how to indent code such that I can give the code once more . Pls help me out with the code .
Vishal Banerjee
7-Nov-18 2:47am
View
Sorry to inform you sir I am unable to install and configure the visual studio for c++ please name some other compilers to be used .
Vishal Banerjee
6-Nov-18 6:24am
View
Ok Sir I am installing Visual Studio.
Vishal Banerjee
6-Nov-18 5:42am
View
OK Sir.
I am using codeblocks 16.01.
Hereby are the errors listed by my compiler:-
||=== Build file: "no target" in "no project" (compiler: unknown) ===|
C:\Users\Admin\Desktop\CLASS12.cpp|1|error: stray '\377' in program|
C:\Users\Admin\Desktop\CLASS12.cpp|1|error: stray '\376' in program|
C:\Users\Admin\Desktop\CLASS12.cpp|1|error: stray '#' in program|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|1|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|2|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|3|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|3|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|3|error: invalid preprocessing directive #i|
C:\Users\Admin\Desktop\CLASS12.cpp|3|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|3|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|3|warning: null character(s) ignored|
C:\Users\Admin\Desktop\CLASS12.cpp|3|warning: null char
Vishal Banerjee
6-Nov-18 5:25am
View
Thank you Sir for your advice, as I am new to programming which can be well understood from my code so this type of problems are there in the code .I want to mean that there are errors reported by my compiler and I am unable to solve them so I am seeking help.
Vishal Banerjee
6-Nov-18 5:18am
View
Thank you for your help but the code when compiled giving error at line number 17 and the error reports :-
|17|error: no matching function for call to 'std::basic_ifstream<char>::basic_ifstream(std::string&)'|
The compiler which I am using is codeblock 16.01
Please help.
Show More