could someone also tell me if the actions i am attempting to do which are stated in the comments are correct or not. i am new at c++ and i think its correct but i have doubts
#include<iostream>
#include<fstream>
#include<cstdlib>
#include<iomanip>
using namespace std;
int main()
{
ifstream in_stream; // reads itemlist.txt
ofstream out_stream1; // writes in items.txt
ifstream in_stream2; // reads pricelist.txt
ofstream out_stream3;// writes in plist.txt
ifstream in_stream4;// read recipt.txt
ofstream out_stream5;// write display.txt
float price=' ',curr_total=0.0;
int wrong=0;
int itemnum=' ';
char next;
in_stream.open("ITEMLIST.txt", ios::in); // list of avaliable items
if( in_stream.fail() )// check to see if itemlist.txt is open
{
wrong++;
cout << " the error occured here0, you have " << wrong++ << " errors" << endl;
cout << "Error opening the filen" << endl;
exit(1);
}
else{
cout << " System ran correctly " << endl;
out_stream1.open("listWititems.txt", ios::out); // list of avaliable items
if(out_stream1.fail() )// check to see if itemlist.txt is open
{
wrong++;
cout << " the error occured here1, you have " << wrong++ << " errors" << endl;
cout << "Error opening the filen";
exit(1);
}
else{
cout << " System ran correctly " << endl;
}
in_stream2.open("PRICELIST.txt", ios::in);
if( in_stream2.fail() )
{
wrong++;
cout << " the error occured here2, you have " << wrong++ << " errors" << endl;
cout << "Error opening the filen";
exit (1);
}
else{
cout << " System ran correctly " << endl;
}
out_stream3.open("listWitdollars.txt", ios::out);
if(out_stream3.fail() )
{
wrong++;
cout << " the error occured here3, you have " << wrong++ << " errors" << endl;
cout << "Error opening the filen";
exit (1);
}
else{
cout << " System ran correctly " << endl;
}
in_stream4.open("display.txt", ios::in);
if( in_stream4.fail() )
{
wrong++;
cout << " the error occured here4, you have " << wrong++ << " errors" << endl;
cout << "Error opening the filen";
exit (1);
}
else{
cout << " System ran correctly " << endl;
}
out_stream5.open("showitems.txt", ios::out);
if( out_stream5.fail() )
{
wrong++;
cout << " the error occured here5, you have " << wrong++ << " errors" << endl;
cout << "Error opening the filen";
exit (1);
}
else{
cout << " System ran correctly " << endl;
}
in_stream.close(); // closing files.
out_stream1.close();
in_stream2.close();
out_stream3.close();
in_stream4.close();
out_stream5.close();
system("pause");
in_stream.setf(ios::fixed);
while(in_stream.eof())
{
in_stream >> itemnum;
cin.clear();
cin >> next;
}
out_stream1.setf(ios::fixed);
while (out_stream1.eof())
{
out_stream1 << itemnum;
cin.clear();
cin >> next;
}
in_stream2.setf(ios::fixed);
in_stream2.setf(ios::showpoint);
in_stream2.precision(2);
while((price== (price*1.00)) && (itemnum == (itemnum*1)))
{
while (in_stream2 >> itemnum >> price) // gets itemnum and price
{
while (in_stream2.eof()) // reads file to end of file
{
in_stream2 >> itemnum;
in_stream2 >> price;
price++;
curr_total= price++;
in_stream2 >> curr_total;
cin.clear(); // allows more reading
cin >> next;
}
}
}
out_stream3.setf(ios::fixed);
out_stream3.setf(ios::showpoint);
out_stream3.precision(2);
while((price== (price*1.00)) && (itemnum == (itemnum*1)))
{
while (out_stream3 << itemnum << price)
{
while (out_stream3.eof()) // reads file to end of file
{
out_stream3 << itemnum;
out_stream3 << price;
price++;
curr_total= price++;
out_stream3 << curr_total;
cin.clear(); // allows more reading
cin >> next;
}
return itemnum, price;
}
}
in_stream4.setf(ios::fixed);
in_stream4.setf(ios::showpoint);
in_stream4.precision(2);
while ( in_stream4.eof())
{
in_stream4 >> itemnum >> price >> curr_total;
cin.clear();
cin >> next;
}
out_stream5.setf(ios::fixed);
out_stream5.setf(ios::showpoint);
out_stream5.precision(2);
out_stream5 <<setw(5)<< " itemnum " <<setw(5)<<" price "<<setw(5)<<" curr_total " <<endl; // sends items and prices to receipt.txt
out_stream5 << setw(5) << itemnum << setw(5) <<price << setw(5)<< curr_total; // sends items and prices to receipt.txt
out_stream5 << " You have a total of " << wrong++ << " errors " << endl;
}
Содержание
- fatal error C1075: end of file found before the left brace ‘<‘ at ‘c:documents and s
- All 21 Replies
- Fatal error c1075 no matching token found
- Fatal error C1075: «<«: не найдена несоответствующая лексема
- Ошибка компилятора C2672
- Пример
- Fatal error c1075 no matching token found
fatal error C1075: end of file found before the left brace ‘<‘ at ‘c:documents and s
Hi everyone I need help with something
i get this error
and i get the error around here
somewhere in there It gives me the error of
if anyone knows what im missing and where it is post a reply because this is the only error I have and I would like to get it fixed
- 12 Contributors 21 Replies 7K Views 7 Years Discussion Span Latest Post 7 Years Ago Latest Post by kuroshmokhtari
isn’t it obvious what your program is missing? There error message said it all — the < and >do not match. I can’t tell you which one is missing because you didn’t post all the code.
What part of the error message are you having difficulty comprehending?
>>OK THIS IS THE ENTIRE THING, HOPE SOMEONE CAN SEE WHAT IM MISSING
Just look at the last line of the code you posted. The code isn’t all there because the last function is …
Thanks for the help ill see if it helps and ill contact you if it dusnt when ur online
ANYONE ELSE READING THIS FEEL FREE TO GIVE ME YOUR RESPONSES FROM YOUR OPINION
As others have said, the error is clear, though it can be time-consuming to track down. …
Another way I have used to find missing braces is to comment out large blocks of code until the error goes away. You can narrow down the problem that way.
isn’t it obvious what your program is missing? There error message said it all — the < and >do not match. I can’t tell you which one is missing because you didn’t post all the code.
Hi everyone I need help with something
i get this error
and i get the error around here
somewhere in there It gives me the error of
if anyone knows what im missing and where it is post a reply because this is the only error I have and I would like to get it fixed
OK THIS IS THE ENTIRE THING, HOPE SOMEONE CAN SEE WHAT IM MISSING
Please tell me if you can help me solve this error and the error again is
What part of the error message are you having difficulty comprehending?
I’m specifically having problems somewhere around the text above and this is the error
Accoding to this im missing a brace or i put one extra but i tried and i cant find out, if anyone can find the error please comment me and tell me
You will have count the braces. For each < there must be a matching >.
>>OK THIS IS THE ENTIRE THING, HOPE SOMEONE CAN SEE WHAT IM MISSING
Just look at the last line of the code you posted. The code isn’t all there because the last function is not complete.
And please use code tags the next time you dump all that code here. Here is how to do it.
[code=cplusplus] // your code goes here
Also please read this thread.
Thanks for the help ill see if it helps and ill contact you if it dusnt when ur online
ANYONE ELSE READING THIS FEEL FREE TO GIVE ME YOUR RESPONSES FROM YOUR OPINION
Thanks for the help ill see if it helps and ill contact you if it dusnt when ur online
ANYONE ELSE READING THIS FEEL FREE TO GIVE ME YOUR RESPONSES FROM YOUR OPINION
As others have said, the error is clear, though it can be time-consuming to track down. You have a brackets problem. Somewhere there is a starting < with no matching ending >. Your job is to find it. Constant code indentation is critical for this. I personally prefer to use this type of formatting:
rather than this type:
since I find brackets matching easier using the first way. There are also many good IDEs like NetBeans and Visual Studio where you can minimize and expand bracket sections quickly by clicking the + and — signs next to the brackets. If you have a very short function and expanding the function makes it 100 lines long, chances are that’s your problem. The method is kind of trial and error and methodical noting of starting and ending brackets line numbers on a piece of paper till you find an extra bracket or a missing bracket. You can also quickly comment out and put back in large chunks of code sometimes, but mostly it’s plain old boring brackets counting.
Источник
Fatal error c1075 no matching token found
I’m trying to compile a CHUMP program and keep getting this error message
I read other forums talking about this error and I can’t seem to put my finger on what I’m doing wrong. I click on the error link and all it does is it brings me to the .cpp file. It does not direct me to an area in visual studio on where the issue may be. I look at the brackets and compare them to other programs and everything seems fine.
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
///
/// Summary for Form1
///
public ref class Form1 : public System::Windows::Forms::Form
<
public:
Form1(void)
<
InitializeComponent();
//
//TODO: Add the constructor code here
//
>
protected:
///
/// Clean up any resources being used.
///
Form1()
<
if (components)
<
delete components;
>
>
private: System::Windows::Forms::Button^ btnCreate;
protected:
protected:
private: System::Windows::Forms::TextBox^ txtItems;
private: System::Windows::Forms::TextBox^ txtLog;
private: System::Windows::Forms::Label^ label1;
private: System::Windows::Forms::Label^ label2;
private:
///
/// Required designer variable.
///
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
///
/// Required method for Designer support — do not modify
/// the contents of this method with the code editor.
///
void InitializeComponent(void)
<
this->btnCreate = (gcnew System::Windows::Forms::Button());
this->txtItems = (gcnew System::Windows::Forms::TextBox());
this->txtLog = (gcnew System::Windows::Forms::TextBox());
this->label1 = (gcnew System::Windows::Forms::Label());
this->label2 = (gcnew System::Windows::Forms::Label());
this->SuspendLayout();
//
// btnCreate
//
this->btnCreate->Location = System::Drawing::Point(317, 44);
this->btnCreate->Name = L»btnCreate»;
this->btnCreate->Size = System::Drawing::Size(112, 30);
this->btnCreate->TabIndex = 0;
this->btnCreate->Text = L»Create Log»;
this->btnCreate->UseVisualStyleBackColor = true;
this->btnCreate->Click += gcnew System::EventHandler(this, &Form1::btnCreate_Click);
//
// txtItems
//
this->txtItems->Font = (gcnew System::Drawing::Font(L»Microsoft Sans Serif», 14.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast (0)));
this->txtItems->Location = System::Drawing::Point(60, 50);
this->txtItems->Name = L»txtItems»;
this->txtItems->Size = System::Drawing::Size(110, 29);
this->txtItems->TabIndex = 1;
this->txtItems->TextAlign = System::Windows::Forms::HorizontalAlignment::Right;
//
// txtLog
//
this->txtLog->Location = System::Drawing::Point(60, 100);
this->txtLog->Multiline = true;
this->txtLog->Name = L»txtLog»;
this->txtLog->ScrollBars = System::Windows::Forms::ScrollBars::Vertical;
this->txtLog->Size = System::Drawing::Size(358, 450);
this->txtLog->TabIndex = 2;
//
// label1
//
this->label1->AutoSize = true;
this->label1->Location = System::Drawing::Point(57, 34);
this->label1->Name = L»label1″;
this->label1->Size = System::Drawing::Size(80, 13);
this->label1->TabIndex = 3;
this->label1->Text = L»Items produced»;
//
// label2
//
this->label2->AutoSize = true;
this->label2->Location = System::Drawing::Point(200, 84);
this->label2->Name = L»label2″;
this->label2->Size = System::Drawing::Size(75, 13);
this->label2->TabIndex = 4;
this->label2->Text = L»Production log»;
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(484, 562);
this->Controls->Add(this->label2);
this->Controls->Add(this->label1);
this->Controls->Add(this->txtLog);
this->Controls->Add(this->txtItems);
this->Controls->Add(this->btnCreate);
this->Name = L»Form1″;
this->Text = L»CHUMP Quality Control Program»;
this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
this->ResumeLayout(false);
this->PerformLayout();
>
#pragma endregion
//Instance variables
Random^ randomNumGen;
String^ strLog;
private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) <
DateTime now = DateTime::Now; // Used as seed value
randomNumGen = gcnew Random(now.Millisecond);
strLog = gcnew String(«ItemttThicknessrn»);
txtItems->Text = «100»;
>
private: System::Void btnCreate_Click(System::Object^ sender, System::EventArgs^ e) <
int items;
double thick;
Int32::TryParse(txtItems->Text, items);
for (int i = 0; i Next(0,1000) /100.0;
strLog += «CHUMP » + i + «:t» + thick + » mmrn»;
>
txtLog->Text = strLog;
>;
>
Источник
Fatal error C1075: «<«: не найдена несоответствующая лексема
ГДЕ ТУТ БЛЯТЬ ОШИБКА!?
void setup_main_menu()
<
static auto set_sub = [](int sub) -> void <
g_cfg.menu.group_sub = sub;
>;
static auto set_tabsub = [](int sub) -> void <
g_cfg.menu.tab_sub = sub;
>;
void setup_main_menu()
<
static auto set_sub = [](int sub)->void
<
g_cfg.menu.group_sub = sub;
>
>;
static auto set_tabsub = [](int sub) -> void
<
g_cfg.menu.tab_sub = sub;
>
>;
void setup_main_menu()
<
static auto set_sub = [](int sub)->void
<
g_cfg.menu.group_sub = sub;
>
>;
static auto set_tabsub = [](int sub) -> void
<
g_cfg.menu.tab_sub = sub;
>
>;
Проект предоставляет различный материал, относящийся к сфере киберспорта, программирования, ПО для игр, а также позволяет его участникам общаться на многие другие темы. Почта для жалоб: [email protected]
Источник
Ошибка компилятора C2672
«function«: соответствующая перегруженная функция не найдена
Компилятору не удалось найти перегруженную функцию, соответствующую указанной функции. Не найдена функция, которая принимает соответствующие параметры, или соответствующая функция не имеет необходимых специальных возможностей в контексте.
При использовании определенных стандартных контейнеров или алгоритмов библиотеки типы должны предоставлять доступные члены или дружественные функции, удовлетворяющие требованиям контейнера или алгоритма. Например, типы итератора должны быть производными от std::iterator<> . Для операций сравнения или использования других операторов в типах элементов контейнера может потребоваться, чтобы тип считался как левый, так и как правый операнд. Использование типа в качестве правого операнда может потребовать реализации оператора в качестве функции, не являющейся членом типа.
Пример
Версии компилятора до Visual Studio 2017 не выполняли проверку доступа к полным именам в некоторых контекстах шаблонов. Это может помешать ожидаемой работе SFINAE там, где подстановка должна завершиться ошибкой из-за отсутствия доступа к имени. Такая ситуация может приводить к сбою или неожиданному поведению во время выполнения из-за того, что компилятор неправильно вызывает неверную перегрузку оператора. В Visual Studio 2017 выводится ошибка компилятора.
Этот пример компилируется в Visual Studio 2015, но вызывает ошибку в Visual Studio 2017. Чтобы устранить эту проблему, сделайте элемент параметра шаблона доступным там, где он вычисляется.
Источник
Fatal error c1075 no matching token found
Бывалый
Профиль
Группа: Участник
Сообщений: 230
Регистрация: 9.4.2008
Репутация: нет
Всего: нет
как боротся с подобной ошибкой
| shuttle |
|
||
| Код |
| fatal error C1075: end of file found before the left brace ‘ <‘ at ‘путь до файла’ |
Создал Win32 -> Windows application ->empty project. Далее накидал код и вылезла подобная ошибка.
![]() |
![]() |
Шустрый
Профиль
Группа: Участник
Сообщений: 59
Регистрация: 3.5.2006
Репутация: нет
Всего: нет
| Zakary |
|
||
|
| Rickert |
|
||
Ситхи не пройдут! Профиль Репутация: нет |
|||
|
любитель
Профиль
Группа: Участник Клуба
Сообщений: 7954
Регистрация: 14.1.2006
Репутация: 79
Всего: 250
не старайтесь выдать явление наоборот, иначе в будущем такой подход в программировании сильно подпортит жизнь.
Не «символ после..» , а «конец файла до..» и эти формулировки не идентичны.
Это сообщение отредактировал(а) mes — 27.4.2009, 09:45



















| mes |
|
||
1. Публиковать ссылки на вскрытые компоненты
2. Обсуждать взлом компонентов и делиться вскрытыми компонентами
- Действия модераторов можно обсудить здесь
- С просьбами о написании курсовой, реферата и т.п. обращаться сюда
- Вопросы по реализации алгоритмов рассматриваются здесь
- FAQ раздела лежит здесь!
Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, JackYF, bsa.
| Правила форума «C/C++: Для новичков» |
| 0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей) |
| 0 Пользователей: |
| « Предыдущая тема | C/C++: Для новичков | Следующая тема » |
[ Время генерации скрипта: 0.1028 ] [ Использовано запросов: 21 ] [ GZIP включён ]
Источник
Adblock
detector
|
lp_4eva Учусь… 60 / 3 / 2 Регистрация: 20.03.2010 Сообщений: 167 |
||||
|
1 |
||||
|
07.11.2010, 09:43. Показов 12898. Ответов 6 Метки нет (Все метки)
Как испарвить ошибку fatal error C1075: end of file found before the left brace ‘{‘ at ‘c:usersuserdocumentsvisual studio 2008projectsrecex4recex4car.h(13)’ was matched ??? Вроде бы все скобки закрыты….
__________________
0 |
|
1562 / 1040 / 94 Регистрация: 17.04.2009 Сообщений: 2,995 |
|
|
07.11.2010, 09:57 |
2 |
|
в «car.h» при описании класса, после фигурной скобки точка с запятой стоит ?
0 |
|
lp_4eva Учусь… 60 / 3 / 2 Регистрация: 20.03.2010 Сообщений: 167 |
||||
|
07.11.2010, 10:03 [ТС] |
3 |
|||
|
Да вроде есть….
0 |
|
1562 / 1040 / 94 Регистрация: 17.04.2009 Сообщений: 2,995 |
|
|
07.11.2010, 10:07 |
4 |
|
{ — две, } — одна
1 |
|
Учусь… 60 / 3 / 2 Регистрация: 20.03.2010 Сообщений: 167 |
|
|
07.11.2010, 10:11 [ТС] |
5 |
|
Спасибо я так и сделала только вот он теперь не распознает мои методы getAction() и getLicense()…. а нет все нашла свои ошибки
0 |
|
232 / 102 / 6 Регистрация: 18.04.2010 Сообщений: 294 |
|
|
07.11.2010, 10:15 |
6 |
|
Приводите примеры. Возможно, что Вы определили их как обычную функцию, а не методы класса.
0 |
|
Учусь… 60 / 3 / 2 Регистрация: 20.03.2010 Сообщений: 167 |
|
|
07.11.2010, 10:29 [ТС] |
7 |
|
Спаибо нашла свои ошибки
0 |
|
IT_Exp Эксперт 87844 / 49110 / 22898 Регистрация: 17.06.2006 Сообщений: 92,604 |
07.11.2010, 10:29 |
|
7 |
- Forum
- General C++ Programming
- fatal error C1075: end of file found bef
fatal error C1075: end of file found before the left brace ‘{‘
I really don’t know what is going on with this guys. I know there is still a little bit of work to be done but any help would be appreciated.
I do not have any idea what this error means and if anybody can help me out I would be so grateful.
Thanks in advance.
Kev.
|
|
It means you have a brace in the wrong place, or are missing a brace somewhere. The line number reported is important as you’re not expected to look thru every line of the program, as you expect us to.
You may want to look at the braces at line 118, there’s obviously something wrong there.
Also, you may want to look at the case statements. There is no break after each case.
I would say you are missing a } at line 112.
Line 121 has a ; and should not.
you are also missing a } at the end.
You have also got a recursive call to start(), this may give you a warning. It would be better to use a while loop in start() not recursive calling.
Last edited on
Thanks guys.
The program is running now.. Just need to sort some other stuff out.
Thanks for the help, I’m a real amateur. lol
Kev.
Topic archived. No new replies allowed.
Hi everyone I need help with something
i get this error
fatal error C1075: end of file found before the left brace ‘{‘ at ‘c:documents and settingsnavideeahdesktopmaplestoryservermaplestoryservermapleisland.cpp(350)’ was matched
and i get the error around here
void NPCsScripts::npc_22000(NPC* npc){ int state = npc->getState(); int map = npc->getPlayerMap(); if(npc->getPlayerMap() == 0){ if(state == 0){ npc->addText("Hey hows it going, I'm Shanks, the Driver of this magnificent ship "); npc->addText("Are you getting tired of this place, well I can take you out of here FOREVER!!"); npc->addText("Just a warning though, once you leave, you will enter the real world, and it is much harder to survive out there, trust me"); npc->sendYesNo(); } else if(state == 1){ if(npc->getSelected() == YES){ npc->addText("Ok then, I'm going to get you out of this place, say goodbye to this place forever, and hey, dont forget to visit me."); npc->sendNext(); } else { npc->addText("Are you positive you dont want to leave this place?"); npc->setState(npc->getState()+1); npc->sendYesNo(); } } else if(state == 2){ npc->teleport(1); npc->end(); } else if(state == 3){ if(npc->getSelected() == NO){ npc->addText("Please talk to me once you can get a yes so I can take you out of here, I've got important things to do you know."); npc->sendNext(); npc->end(); } } else if(state == 4){ npc->teleport(40000); npc->end(); }somewhere in there It gives me the error of
fatal error C1075: end of file found before the left brace ‘{‘ at ‘c:documents and settingsnavideeahdesktopmaplestoryservermaplestoryservermapleisland.cpp(350)’ was matched
if anyone knows what im missing and where it is post a reply because this is the only error I have and I would like to get it fixed
Thanks
OK THIS IS THE ENTIRE THING, HOPE SOMEONE CAN SEE WHAT IM MISSING
#include "NPCs.h"
#include "NPCsScripts.h"
void NPCsScripts::npc_2100(NPC* npc){
int state = npc->getState();
int map = npc->getPlayerMap();
if(npc->getPlayerMap() == 0){
if(state == 0){
npc->addText("Welcome to the world of MapleStory. The purpose of this training camp is to ");
npc->addText("help beginners. Would you like to enter this training camp? Some people start thier journey ");
npc->addText(" without taking the training program. But I strongly recommend you take the training program first.");
npc->sendYesNo();
}
else if(state == 1){
if(npc->getSelected() == YES){
npc->addText("Ok then, I will let you enter the training camp. Please follow your instructor's lead.");
npc->sendNext();
}
else {
npc->addText("Do you really wanted to start your journey right away?");
npc->setState(npc->getState()+1);
npc->sendYesNo();
}
}
else if(state == 2){
npc->teleport(1);
npc->end();
}
else if(state == 3){
if(npc->getSelected() == NO){
npc->addText("Please talk to me again when you finally made your decision.");
npc->sendNext();
npc->end();
}
else{
npc->addText("It seems like you want to start your journey without taking the ");
npc->addText("training program. Then, I will let you move on the training ground. Be careful~");
npc->sendNext();
}
}
else if(state == 4){
npc->teleport(40000);
npc->end();
}
}
else if (map == 1){
if(state == 0){
npc->addText("The is the image room where your first training program begins. ");
npc->addText("In this room, you will have an advance look into the job of your choice. ");
npc->sendNext();
}
else if(state == 1){
npc->addText("Once you train hard enough, you will be entitled to occupy a job. ");
npc->addText("You can become a Bowman in Henesys, a Magician in Ellinia, a Warrior in Perion, and a Thief in Kerening City..");
npc->sendBackOK();
}
else if(state == 2){
npc->end();
}
}
else{
npc->end();
}
}
void NPCsScripts::npc_2101(NPC* npc){
int state = npc->getState();
if(state == 0){
npc->addText("Are you done with your training? ");
npc->addText("If you wish, I will send you out from this training camp.");
npc->sendYesNo();
}
else if(state == 1){
if(npc->getSelected() == YES){
npc->addText("Then, I will send you out from here. Good job.");
npc->sendNext();
}
else{
npc->addText("Haven't you finish the training program yet? ");
npc->addText("If you want to leave this place, please do not hesitate to tell me.");
npc->sendOK();
}
}
else if(state == 2){
if(npc->getSelected() == YES){
npc->teleport(3);
}
npc->end();
}
}
void QuestsScripts::npc_2000s(NPC* npc){
int state = npc->getState();
if(state == 0){
npc->addText("Hey there, Pretty~ I am Roger who teachs you adroable new Maplers with lots of information.");
npc->sendNext();
}
else if(state == 1){
npc->addText("I know you are busy! Please spare me some time~ I can teach you some useful information! Ahahaha!");
npc->sendBackNext();
}
else if(state == 2){
npc->addText("So..... Let me just do this for fun! Abaracadabra~!");
npc->sendAcceptDecline();
}
else if(state == 3){
if(npc->getSelected() == ACCEPT){
npc->setPlayerHP(25);
npc->giveItem(2010007, 1);
npc->addQuest(1021);
npc->setState(npc->getState()+1);
npc->addText("Surprised? If HP becomes 0, then you are in trouble. Now, I will give you #r#t2010007##k. Please take it. ");
npc->addText("You will feel stronger. Open the Item window and double click to consume. Hey, It's very simple to open the Item window. Just press #bI#k on your keyboard.");
npc->sendNext();
}
else{
npc->addText("I can't believe you just have turned down a attractive guys like me!");
npc->sendNext();
npc->end();
}
}
else if(state == 4){
npc->addText("Surprised? If HP becomes 0, then you are in trouble. Now, I will give you #r#t2010007##k. Please take it. ");
npc->addText("You will feel stronger. Open the Item window and double click to consume. Hey, It's very simple to open the Item window. Just press #bI#k on your keyboard.");
npc->sendNext();
}
else if(state == 5){
npc->addText("Please take all #t2010007#s that I gave you. You will be able to see the HP bar increasing. ");
npc->addText("Please talk to me again when you recover your HP 100%");
npc->sendBackOK();
}
else if(state == 6){
npc->end();
}
}
void QuestsScripts::npc_2000e(NPC* npc){
int state = npc->getState();
if(state == 0){
npc->addText("How easy is it to consume the item? Simple, right? You can set a #bhotkey#k on the right bottom slot. Haha you didn't know that! right? ");
npc->addText("Oh, and if you are a begineer, HP will automatically recover itself as time goes by. Well it takes time but this is one of the strategies for the beginners.");
npc->sendNext();
}
else if(state == 1){
npc->addText("Alright! Now that you have learned alot, I will give you a present. This is a must for your travle in Maple World, so thank me! Please use this under emergency cases!");
npc->sendBackNext();
}
else if(state == 2){
npc->addText("Okay, this is all I can teach you. I know it's sad but it is time to say good bye. Well tack care of yourself and Good luck my friend!rnrn");
npc->addText("#fUI/UIWindow.img/QuestIcon/4/0#rn#v2010000# 3 #t2010000#rn#v2010009# 3 #t2010009#rnrn#fUI/UIWindow.img/QuestIcon/8/0# 10 exp");
npc->sendBackNext();
}
else if(state == 3){
npc->endQuest(1021);
npc->giveItem(2010000, 3);
npc->giveItem(2010009, 3);
npc->giveEXP(10);
npc->end();
}
}
void NPCsScripts::npc_9101001(NPC* npc){
int state = npc->getState();
if(state == 0){
npc->addText("You have finished all your trainings. Good job. ");
npc->addText("You seem to be ready to start with the journey right away! Good , I will let you on to the next place.");
npc->sendNext();
}
else if(state == 1){
npc->addText("But remember, once you get out of here, you will enter a village full with monsters. Well them, good bye!");
npc->sendBackNext();
}
else if(state == 2){
npc->teleport(40000);
npc->end();
}
}
void NPCsScripts::npc_2020005(NPC* npc){
char npcs[10][20] = {"0022000", "2012019", "2030002", "2030009", "2081006", "1061013", "2010003", "1052006", "1061000", "2060003"};
char npcnames[10][20] = {"Shanks", "Moppie", "Corporal Easy", "Glivver", "Moira", "Gwin", "Neve", "Jake", "Chrishrama", "Melias"};
char npcmaps[10][30] = {"Southperry", "Orbis", "Cloud Park VI", "Ice Valley II", "Cave of Life - Entrance", "Another Entrance", "Orbis Park", "Subway Ticketing Booth", "Sleepywood", "Department Store"};
char scrolls[14][20] = {"2043001", "2043101", "2043201", "2043301", "2043701", "2043801", "2044001", "2044101", "2044201", "2044301", "2044401", "2044501", "2044601", "2044701"};
int state = npc->getState();
if(state == 0){
npc->addText("In my old age, I've forgotten many of my friends names from far and distant lands. Can you help me remember them?");
npc->sendAcceptDecline();
}
else if(state == 1){
if(npc->getSelected() == DECLINE){
npc->end();
return;
}
npc->addText("Thank you. My mind's sharpness has left me years ago *chuckles*. My pocketbook still contains many pictures of friends from long ages past. Many of my friends I'm sure you'll find very familiar, ");
npc->addText("however some of my newer friends will probably be just as difficult for you as it is for me. I'm sure you've had the ability to meet all of these people. After all, that ship in Cloud City can only take you so far, mmm?");
npc->sendNext();
}
else if(state == 2){
npc->addText("I have two questions for you for every picture in my pocketbook, and I have ten forgetful memories. #bIf you could be so kind as to not only tell me the name of the person, but also where I might find that person?#k ");
npc->addText("Should you say something that perhaps jogs my memory a bit, perhaps I will reward you. Take as long as you like - by Merlin's beard I'm in no hurry. Are you ready to begin this quiz?");
npc->sendYesNo();
}
else if(state >= 3 && state <= 32){
if(npc->getSelected() == NO){
npc->end();
return;
}
if((state-3)%3 == 0){
if(state-3!=0){
if(strcmp(npc->getText(), npcmaps[(state-3)/3-1]) == 0){
npc->setVariable("count", npc->getVariable("count")+1);
}
}
if((state-3)/3+1>=10){
npc->addChar(((state-3)/3)/10+'1');
npc->addChar(((state-3)/3+1)%10+'0');
}
else
npc->addChar((state-3)/3+'1');
npc->addText(".rn#fNpc/");
npc->addText(npcs[(state-3)/3]);
npc->addText(".img/stand/0#");
npc->sendNext();
}
else if((state-3)%3 == 1){
npc->addText("What is his name?");
npc->sendGetText();
}
else if((state-3)%3 == 2){
if(strcmp(npc->getText(), npcnames[(state-3)/3]) == 0){
npc->setVariable("count", npc->getVariable("count")+1);
}
npc->addText("And where can I find him?");
npc->sendGetText();
}
}
else if(state == 33){
if(strcmp(npc->getText(), npcmaps[(state-3)/3-1]) == 0){
npc->setVariable("count", npc->getVariable("count")+1);
}
npc->addText("Thank you so much for hel... hold on just a moment. Ah, dear me! I left a list of these people's names in here should I ever forget. Wonderful, now I feel foolish! ");
npc->addText("Well, a deal is a deal. I'll reward you based upon the ones you got correct.");
npc->sendNext();
}
else if(state == 34){
int count = npc->getVariable("count");
if(count <= 5){
npc->addText("You get nothing. You don't know your NPC!");
}
else if(count <= 10){
npc->addText("#fUI/UIWindow.img/QuestIcon/7/0#rn#fItem/Special/0900.img/09000003/iconRaw/0# 1,000,000 Mesos");
}
else if(count <= 15){
npc->addText("#fUI/UIWindow.img/QuestIcon/7/0#rn#fItem/Special/0900.img/09000003/iconRaw/0# 3,000,000 Mesosrnrn#fUI/UIWindow.img/QuestIcon/4/0#rn#v2070005# #t2070005#");
}
else if(count <= 19){
npc->addText("#fUI/UIWindow.img/QuestIcon/7/0#rn#fItem/Special/0900.img/09000003/iconRaw/0# 10,000,000 Mesosrnrn#fUI/UIWindow.img/QuestIcon/4/0#rn#v2070005# #t2070005#rnrn#fUI/UIWindow.img/QuestIcon/3/0#");
for(int i=0; i<14; i++){
npc->addText("rn#L");
if(i>=10)
npc->addChar(i/10+'0');
npc->addChar(i%10+'0');
npc->addText("##v");
npc->addText(scrolls[i]);
npc->addText("# #t");
npc->addText(scrolls[i]);
npc->addText("##l");
}
npc->addText("rn");
}
else{
npc->addText("#fUI/UIWindow.img/QuestIcon/7/0#rn#fItem/Special/0900.img/09000003/iconRaw/0# 12,000,000 Mesosrnrn#fUI/UIWindow.img/QuestIcon/4/0#rn#v2070006# #t2070006#rn#v4001102# Alcaster's Statuernrn#fUI/UIWindow.img/QuestIcon/3/0#");
for(int i=0; i<14; i++){
npc->addText("rn#L");
if(i>=10)
npc->addChar(i/10+'0');
npc->addChar(i%10+'0');
npc->addText("##v");
npc->addText(scrolls[i]);
npc->addText("# #t");
npc->addText(scrolls[i]);
npc->addText("##l");
}
npc->addText("rn");
}
if(count>15)
npc->sendSimple();
else
npc->sendOK();
}
else if(state == 35){
int count = npc->getVariable("count");
if(count <= 5){
}
else if(count <= 10){
npc->giveMesos(1000000);
}
else if(count <= 15){
npc->giveMesos(3000000);
npc->giveItem(2070005, 1);
}
else if(count <= 19){
npc->giveMesos(10000000);
npc->giveItem(2070005, 1);
npc->giveItem(strval(scrolls[npc->getSelected()]), 1);
}
else {
npc->giveMesos(12000000);
npc->giveItem(4001102, 1);
npc->giveItem(2070006, 1);
npc->giveItem(strval(scrolls[npc->getSelected()]), 1);
}
npc->end();
}
}
/* void NPCsScripts::npc_2100(NPC* npc){
char arr[2][90] = {"60000", "221000300"};
int state = npc->getState();
if(state == 0){
npc->addText("#bBe prepared#k ;)))");
npc->sendNext();
}
else if(state == 1){
npc->addText("CHOOOOOSE! BOHAHAHAHAHAH ;))#b");
for(int i=0; i<2; i++){
npc->addText("rn#L");
npc->addChar(i+'0');
npc->addText("##m");
npc->addText(arr[i]);
npc->addText("##l");
}
npc->sendSimple();
}
else if(state == 2){
npc->teleport(strval(arr[npc->getSelected()]));
npc->end();
}
}
*/
void NPCsScripts::npc_22000(NPC* npc){
int state = npc->getState();
int map = npc->getPlayerMap();
if(npc->getPlayerMap() == 0){
if(state == 0){
npc->addText("Hey hows it going, I'm Shanks, the Driver of this magnificent ship ");
npc->addText("Are you getting tired of this place, well I can take you out of here FOREVER!!");
npc->addText("Just a warning though, once you leave, you will enter the real world, and it is much harder to survive out there, trust me");
npc->sendYesNo();
}
else if(state == 1){
if(npc->getSelected() == YES){
npc->addText("Ok then, I'm going to get you out of this place, say goodbye to this place forever, and hey, dont forget to visit me.");
npc->sendNext();
}
else {
npc->addText("Are you positive you dont want to leave this place?");
npc->setState(npc->getState()+1);
npc->sendYesNo();
}
}
else if(state == 2){
npc->teleport(1);
npc->end();
}
else if(state == 3){
if(npc->getSelected() == NO){
npc->addText("Please talk to me once you can get a yes so I can take you out of here, I've got important things to do you know.");
npc->sendNext();
npc->end();
}
}
else if(state == 4){
npc->teleport(40000);
npc->end();
Please tell me if you can help me solve this error and the error again is
fatal error C1075: end of file found before the left brace ‘{‘ at ‘c:documents and settingsnavideeahdesktopmaplestoryservermaplestoryservermapleisland.cpp(350)’ was matched
- Remove From My Forums
-
Question
-
>c: : fatal error C1075: end of file found before the left brace '{' at 'c:\visual studio 2008projectswas matched#include <iostream> #include <cstdlib> #include <time.h> using namespace std; int main() { start: int YourGeuss=0; int randomNumber1=rand(); int randomNumber2=rand(); srand(static_cast<unsigned int>(time(0))); // Seeds the random numbers int myNumber1=(randomNumber1 % 100); // sets myNumber1 to random 100 limit int myNumber2=(randomNumber2 % 100); // sets myNumber2 to random 100 limit int Sum=myNumber1+myNumber2; // sum of two random numbers { char instruct; cout<< "Welcome to The Geussing Game"; cout <<" Do You require instructions?(Y/N):"; instruct= false; cin >> instruct; if (instruct == 'n' || instruct == 'N') {cout <<" Okay, heres the game!n";} //Gets input if user needs instructions else if (instruct == 'y' || instruct == 'Y') { cout <<" The computer will display a number and a sum using addition: Geuss the missing number.n"; { system("PAUSE"); return 0;}// NOTE THE ABOVE WORKED BEFORE BELOW WAS PUT IN I ALSO REQUEST A SUGGESTION AS TO A BETTER WAY TO DO THE BELOW // Sets up user geusses // do{ while( YourGeuss =myNumber2); // exit do //cout << myNumber1 << " +t "<< "=" << Sum << endl; // cout << "Whats your geuss"; // cin >> YourGeuss; // if (YourGeuss =myNumber2 )cout >>" You got itn"; // else if (YourGeuss != myNumber2) cout <<" thats not it, try again:n"; //while (YourGeuss!=Sum); this loop workedcout <<" Play again?(Y/N):n"; char again; cin >> again; if(again == 'n' || again == 'N'){cout << "Okay, bye!n";} // checking for user input upper/lowercase letter used. else if(again == 'y' || again == 'Y'){goto start;} system("PAUSE"); return 0; }
Answers
-
Note that you can use features of an editor for finding
matching braces (and parentheses, etc.). In VC++ 2008
the editor provides these aids:(1) Ctrl-] — when pressed and the cursor is on a bracket
the cursor will jump to the corresponding matching
bracket. Use this to check that code blocks start and
end where you expect them to. This works with round,
curly, square, and angle brackets.This is the same in VC++ 2010. See:
Default Key Bindings
http://download.microsoft.com/download/2/9/6/296AAFA4-669A-46FE-9509-93753F7B0F46/VS-KB-Brochure-CPP-A4.pdf(2) Under Tools->Options->Environment->Fonts and Colors
you can set the color for «Brace Matching». When you enter
a closing brace in the editor the corresponding opening
brace will be colored automatically. This requires that
the option «Automatic delimiter highlighting» is checked
under Tools->Options->Text Editor->General
Coloring lasts until you move the cursor.— Wayne
-
Marked as answer by
Wednesday, November 30, 2011 9:04 AM
-
Marked as answer by
ошибка C1075 — символ ‘{‘ после конца файла
|
|
От: |
xzibit |
|
| Дата: | 27.04.09 02:12 | ||
| Оценка: |
как боротся с подобной ошибкой
fatal error C1075: end of file found before the left brace '{' at 'путь до файла'
Создал Win32 -> Windows application ->empty project. Далее накидал код и вылезла подобгая ошибка.
Re: ошибка C1075 — символ ‘{‘ после конца файла
|
|
От: |
Bell |
|
| Дата: | 27.04.09 02:42 | ||
| Оценка: |
Здравствуйте, xzibit, Вы писали:
X>как боротся с подобной ошибкой
X>
X>fatal error C1075: end of file found before the left brace '{' at 'путь до файла'
X>
X>Создал Win32 -> Windows application ->empty project. Далее накидал код и вылезла подобгая ошибка.
Очевидно, забыл где-то закрывающую скобку
Попытайся выделить минимальный кусок кода, на котором эта ошибка повторяется.
Любите книгу — источник знаний (с) М.Горький
Re: ошибка C1075 — символ ‘{‘ после конца файла
|
|
От: |
Erop |
|
| Дата: | 27.04.09 05:38 | ||
| Оценка: |
2 (1) |
Здравствуйте, xzibit, Вы писали:
X>Создал Win32 -> Windows application ->empty project. Далее накидал код и вылезла подобгая ошибка.
Видимо ты в MSVC разрабатываешь?
Напиши закрывающую } в конце файла и нажми ctrl+] — увидишь незакрытую скрбку…
Все эмоциональные формулировки не соотвествуют действительному положению вещей и приведены мной исключительно «ради красного словца». За корректными формулировками и неискажённым изложением идей, следует обращаться к их автором или воспользоваться поиском
Re: ошибка C1075 — символ ‘{‘ после конца файла
|
|
От: |
alzt |
|
| Дата: | 27.04.09 05:57 | ||
| Оценка: |
Здравствуйте, xzibit, Вы писали:
X>как боротся с подобной ошибкой
X>
X>fatal error C1075: end of file found before the left brace '{' at 'путь до файла'
X>
X>Создал Win32 -> Windows application ->empty project. Далее накидал код и вылезла подобгая ошибка.
Где-то ошибся при форматировании. Посчитай количество открытых и закрытых скобок.
Re: ошибка C1075 — символ ‘{‘ после конца файла
|
|
От: |
jazzer |
Skype: enerjazzer |
| Дата: | 27.04.09 13:49 | ||
| Оценка: |
Здравствуйте, xzibit, Вы писали:
X>как боротся с подобной ошибкой
X>
X>fatal error C1075: end of file found before the left brace '{' at 'путь до файла'
X>
X>Создал Win32 -> Windows application ->empty project. Далее накидал код и вылезла подобгая ошибка.
Если у тебя есть написанные тобой заголовочные файлы, то частенько ошибка именно в них (особенно если в файле, в котором ты их подключаешь, все скобки в порядке).
Например, где-то есть #ifdef без соответствующего #endif, в результате чего закрывающая скобка не попала в компилятор.
Так что можешь попробовать закомментировать инклуды и посмотреть, изчезнет ли эта ошибка (появится, естественно, много других, но ты на них не обращай внимания до поры).
Re: ошибка C1075 — символ ‘{‘ после конца файла
|
|
От: |
nen777w |
|
| Дата: | 27.04.09 15:05 | ||
| Оценка: |
Если MSVC. Ставь Visual Assist X
Re: ошибка C1075 — символ ‘{‘ после конца файла
|
|
От: |
Вертер |
|
| Дата: | 27.04.09 23:17 | ||
| Оценка: |
1 (1) |
X>как боротся с подобной ошибкой
X>
X>fatal error C1075: end of file found before the left brace '{' at 'путь до файла'
X>
X>Создал Win32 -> Windows application ->empty project. Далее накидал код и вылезла подобгая ошибка.
могу ошибаться, но кажется такая ошибка может вылезти, если в хаголовочном файле после описания класса забудешь поставить символ «;».
Re: ошибка C1075 — символ ‘{‘ после конца файла
|
|
От: |
vnp |
|
| Дата: | 28.04.09 05:09 | ||
| Оценка: |
Здравствуйте, xzibit, Вы писали:
X>как боротся с подобной ошибкой
X>
X>fatal error C1075: end of file found before the left brace '{' at 'путь до файла'
X>
X>Создал Win32 -> Windows application ->empty project. Далее накидал код и вылезла подобгая ошибка.
Покажите файл.
———
…Очевидно, забыл где-то закрывающую скобку
…Напиши закрывающую } в конце файла и нажми ctrl+] — увидишь незакрытую скрбку
…Посчитай количество открытых и закрытых скобок.
…особенно если в файле, в котором ты их подключаешь, все скобки в порядке
Господа! у человека потеряна открывающая скобка. Пусть найдет ее, тогда и баланс можно будет считать.
Re: Это международный слёт экстрасенсов?
|
|
От: |
Tilir |
http://tilir.livejournal.com |
| Дата: | 29.04.09 11:18 | ||
| Оценка: |
3 (1) |
Сколько вариантов… ммм… сердце радуется
2xzibit: покажите уж файл, сравним чья телепатия оказалась сильнее.
Re[2]: Это международный слёт экстрасенсов?
|
|
От: |
dcb-BanDos |
|
| Дата: | 29.04.09 14:25 | ||
| Оценка: |
Здравствуйте, Tilir, Вы писали:
T>Сколько вариантов… ммм… сердце радуется
T>2xzibit: покажите уж файл, сравним чья телепатия оказалась сильнее.
уверен что вариант с
class tratata
{
}
=)
Ничто не ограничивает полет мысли программиста так, как компилятор.
Re[2]: ошибка C1075 — символ ‘{‘ после конца файла
|
|
От: |
dimchick |
|
| Дата: | 10.05.09 23:53 | ||
| Оценка: |
Здравствуйте, Erop, Вы писали:
E>Здравствуйте, xzibit, Вы писали:
X>>Создал Win32 -> Windows application ->empty project. Далее накидал код и вылезла подобгая ошибка.
E>Видимо ты в MSVC разрабатываешь?
E>Напиши закрывающую } в конце файла и нажми ctrl+] — увидишь незакрытую скрбку…
хм… нажимая ctrl+] на последней добавленной скобке меня бросает на первую открывающую скобку. Как ты выкупаешь «незакрытую скрбку» если она гдето в середине кода?


- Переместить
- Удалить
- Выделить ветку
Пока на собственное сообщение не было ответов, его можно удалить.








Загрузка .







спасибо)