Ошибка c1075 visual studio

Permalink

Cannot retrieve contributors at this time

description title ms.date f1_keywords helpviewer_keywords ms.assetid

Learn more about: Fatal Error C1075

Fatal Error C1075

11/04/2016

C1075

C1075

69a74e3d-b53f-4526-a440-2c94e6403355

the left token was unmatched at the end of the file

The compiler expected matching token before it reached the end of file.

This error can be caused by an unmatched bracket, brace, or other paired character.

Possibly related to my other question (note: different error code):

  • Why might the “fatal error C1001” error occur intermittently when using msbuild?

Our buildbot slave compiles our source code nightly and works most of the time, but intermittently, we see this error:

c:Program FilesMicrosoft Visual Studio 9.0VCincludextree(223) : fatal error C1075: end of file found before the left brace '{' at '..libnetCSocketMultiplexer.cpp(62)' was matched
        c:Program FilesMicrosoft Visual Studio 9.0VCincludextree(427) : see reference to class template instantiation 'std::_Tree<_Traits>::const_iterator' being compiled
        with
        [
            _Traits=std::_Tmap_traits<ISocket *,CSocketMultiplexer::CJobCursor,std::less<ISocket *>,std::allocator<std::pair<ISocket *const ,CSocketMultiplexer::CJobCursor>>,false>
        ]
        ..libnetCSocketMultiplexer.cpp(75) : see reference to class template instantiation 'std::_Tree<_Traits>::iterator' being compiled
        with
        [
            _Traits=std::_Tmap_traits<ISocket *,CSocketMultiplexer::CJobCursor,std::less<ISocket *>,std::allocator<std::pair<ISocket *const ,CSocketMultiplexer::CJobCursor>>,false>
        ]

See the full log output and CSocketMultiplexer.cpp — Is there anything that I can change in CSocketMultiplexer.cpp that might stop this from happening in future?

Also, probably not worth mentioning, but later on in the log, we see this error (which makes total sense, since the file wasn’t compiled):

Copyright (C) Microsoft Corporation. All rights reserved.
BSCMAKE: error BK1506 : cannot open file '.synergy.dirDebugCSocketMultiplexer.sbr': No such file or directory

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; 


}

  • Remove From My Forums
  • Question

  • Hello, 

    I have an app which when on compiling for windows store app, I am getting C1075 compilation error.  

    This app has «#import msxml3.dll»

    1>c:program files (x86)microsoft visual studio 11.0vcincludecomdef.h(70): fatal error C1075: end of file found before the left brace ‘{‘ at ‘e:comp1buildmylibvc10debugmsxml3.tlh(13)’ was matched

    I looked at the msxml3.tlh file but could not see the unmatched brace

    I do not get this error on compiling this without WINAPI_PARTITION_APP preprocessor directive.

    Any suggestion to be tried out to zero upon the issue ?

Answers

  • Hi AAryanman,

    I think you should review your macro “WINAPI_PARTITION_APP ”, if you really have missed some brace or some double quotes, and maybe it is a #define conflicts which you also need to be aware.

    If the problem is still exist after the checking, you may post the code to here.

    Good luck then.


    James He
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by

      Wednesday, July 24, 2013 3:15 AM

Xopecc

33 / 28 / 9

Регистрация: 13.09.2013

Сообщений: 250

1

13.09.2013, 07:57. Показов 5458. Ответов 12

Метки нет (Все метки)


Студворк — интернет-сервис помощи студентам

Делаю простенький калькулятор, на 1 действие. Использую операторы If-Else. Использую Microsoft Visual Studio 2012. Пожалуйста, помогите найти ошибку!

C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include<iostream>
#include<conio.h>
#include<cmath>
using std::cout;
using std::cin;
using std::endl;
int main()
{
    setlocale(LC_ALL , "Russian");
    cout<<"ttМини-калькуляторnn";
    cout<<"В данном калькуляторе вы сможете выполнить ряд простых действий для 2-ух чисел!n";
    cout<<"Введите вашу операцию(Не более 1 операции)nВводите значения через пробел!";
    double A,B,C;
    char S;
    cin>>A>>S>>B;
    if(S!='+'&&S!='-'&&S!='*'&&S!='/')
    {
    cout<<"Вы не ввели знак операции!";
    _getch();
    return -1;
    }else{
        if(S=='+'){
        C=A+B;
        cout<<A<<"+"<<B<<"="<<C;
    }else{
        if(S=='-'){
        C=A-B;
        cout<<A<<"-"<<B<<"="<<C;
    }else{
        if(S=='*'){
        C=A*B;
        cout<<A<<"*"<<B<<"="<<C;
    }else{
        if(S=='/'){
        C=A/B;
        cout<<A<<"/"<<B<<"="<<C;}
 
 
 
    cout<<"nnCopyright (c) 2013 by Xopecc.  ALL RIGHTS RESERVED";
    _getch();
    return 0;
}
}



0



alsav22

5496 / 4891 / 831

Регистрация: 04.06.2011

Сообщений: 13,587

13.09.2013, 08:11

2

C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include<iostream>
#include<conio.h>
#include<cmath>
 
using std::cout;
using std::cin;
using std::endl;
 
int main()
{
    setlocale(LC_ALL , "Russian");
    
    cout<<"ttМини-калькуляторnn";
    cout<<"В данном калькуляторе вы сможете выполнить ряд простых действий для 2-ух чисел!n";
    cout<<"Введите вашу операцию(Не более 1 операции)nВводите значения через пробел!";
    
    double A, B, C;
    char S;
    cin >> A >> S >> B;
    if(S != '+' && S != '-' && S != '*' && S != '/')
    {
        cout<<"Вы не ввели знак операции!";
        _getch();
        return -1;
    }
    
    if(S=='+')
    {
        C=A+B;
        cout<<A<<"+"<<B<<"="<<C;
    }
    
    if(S=='-')
    {
        C=A-B;
        cout<<A<<"-"<<B<<"="<<C;
    }
    
    if(S=='*')
    {
        C=A*B;
        cout<<A<<"*"<<B<<"="<<C;
    }
    
    if(S=='/')
    {
        C=A/B;
        cout<<A<<"/"<<B<<"="<<C;
    }
 
    cout<<"nnCopyright (c) 2013 by Xopecc.  ALL RIGHTS RESERVED";
    
    _getch();
    return 0;
}



1



39 / 39 / 8

Регистрация: 03.05.2013

Сообщений: 178

13.09.2013, 08:12

3

36 строка скопку закрой



0



Xopecc

33 / 28 / 9

Регистрация: 13.09.2013

Сообщений: 250

13.09.2013, 08:13

 [ТС]

4

Цитата
Сообщение от alsav22
Посмотреть сообщение

C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include<iostream>
#include<conio.h>
#include<cmath>
 
using std::cout;
using std::cin;
using std::endl;
 
int main()
{
    setlocale(LC_ALL , "Russian");
    
    cout<<"ttМини-калькуляторnn";
    cout<<"В данном калькуляторе вы сможете выполнить ряд простых действий для 2-ух чисел!n";
    cout<<"Введите вашу операцию(Не более 1 операции)nВводите значения через пробел!";
    
    double A, B, C;
    char S;
    cin >> A >> S >> B;
    if(S != '+' && S != '-' && S != '*' && S != '/')
    {
        cout<<"Вы не ввели знак операции!";
        _getch();
        return -1;
    }
    
    if(S=='+')
    {
        C=A+B;
        cout<<A<<"+"<<B<<"="<<C;
    }
    
    if(S=='-')
    {
        C=A-B;
        cout<<A<<"-"<<B<<"="<<C;
    }
    
    if(S=='*')
    {
        C=A*B;
        cout<<A<<"*"<<B<<"="<<C;
    }
    
    if(S=='/')
    {
        C=A/B;
        cout<<A<<"/"<<B<<"="<<C;
    }
 
    cout<<"nnCopyright (c) 2013 by Xopecc.  ALL RIGHTS RESERVED";
    
    _getch();
    return 0;
}

Так где была ошибка?



0



5496 / 4891 / 831

Регистрация: 04.06.2011

Сообщений: 13,587

13.09.2013, 08:15

5

Цитата
Сообщение от Xopecc
Посмотреть сообщение

Так где была ошибка?

Скобки не хватало где-то…



0



Winorun

39 / 39 / 8

Регистрация: 03.05.2013

Сообщений: 178

13.09.2013, 08:15

6

мой ответ к первому варианту ты после if вторую закрывающуюся скобку зыбываешь причем везде

C++
1
2
3
4
else{
        if(S=='/'){
        C=A/B;
        cout<<A<<"/"<<B<<"="<<C;}}//<= тут



1



33 / 28 / 9

Регистрация: 13.09.2013

Сообщений: 250

13.09.2013, 08:17

 [ТС]

7

Цитата
Сообщение от alsav22
Посмотреть сообщение

Скобки не хватало где-то…

То есть можно было не использовать Else?



0



39 / 39 / 8

Регистрация: 03.05.2013

Сообщений: 178

13.09.2013, 08:20

8

блин ты открыл елсе открыл иф а скобку забыл используй case

Добавлено через 27 секунд
я тебе даше строку указал



0



33 / 28 / 9

Регистрация: 13.09.2013

Сообщений: 250

13.09.2013, 08:21

 [ТС]

9

Цитата
Сообщение от Winorun
Посмотреть сообщение

блин ты открыл елсе открыл иф а скобку забыл используй case

Добавлено через 27 секунд
я тебе даше строку указал

через case не интересно



0



39 / 39 / 8

Регистрация: 03.05.2013

Сообщений: 178

13.09.2013, 08:22

10

ну так закрой скобку после else и будет тебе счастье



0



5496 / 4891 / 831

Регистрация: 04.06.2011

Сообщений: 13,587

13.09.2013, 08:22

11

Цитата
Сообщение от Xopecc
Посмотреть сообщение

То есть можно было не использовать Else?

Смысла нет в else. Можно case, чтобы избежать лишних проверок в if.



0



39 / 39 / 8

Регистрация: 03.05.2013

Сообщений: 178

13.09.2013, 08:25

12

согласуй количество открывающихся фигурных скобок с закрывающимися



0



alsav22

5496 / 4891 / 831

Регистрация: 04.06.2011

Сообщений: 13,587

13.09.2013, 08:29

13

Цитата
Сообщение от Xopecc
Посмотреть сообщение

через case не интересно

Тоже самое, что case, только без case:

C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include<iostream>
#include<conio.h>
#include<cmath>
 
using std::cout;
using std::cin;
using std::endl;
 
int main()
{
    setlocale(LC_ALL , "Russian");
    
    cout<<"ttМини-калькуляторnn";
    cout<<"В данном калькуляторе вы сможете выполнить ряд простых действий для 2-ух чисел!n";
    cout<<"Введите вашу операцию(Не более 1 операции)nВводите значения через пробел!";
    
    double A, B, C;
    char S;
    cin >> A >> S >> B;
    if(S != '+' && S != '-' && S != '*' && S != '/')
    {
        cout<<"Вы не ввели знак операции!";
        _getch();
        return -1;
    }
    
    while (true)
    {
        if(S=='+')
        {
            C=A+B;
            cout<<A<<"+"<<B<<"="<<C;
            break;
        }
    
        if(S=='-')
        {
            C=A-B;
            cout<<A<<"-"<<B<<"="<<C;
            break;
        }
    
        if(S=='*')
        {
            C=A*B;
            cout<<A<<"*"<<B<<"="<<C;
            break;
        }
    
        if(S=='/')
        {
            C=A/B;
            cout<<A<<"/"<<B<<"="<<C;
            break;
        }
    }
    
    cout<<"nnCopyright (c) 2013 by Xopecc.  ALL RIGHTS RESERVED";
    
    _getch();
    return 0;
}



0



IT_Exp

Эксперт

87844 / 49110 / 22898

Регистрация: 17.06.2006

Сообщений: 92,604

13.09.2013, 08:29

13

Понравилась статья? Поделить с друзьями:

Не пропустите эти материалы по теме:

  • Яндекс еда ошибка привязки карты
  • Ошибка c1061 suzuki grand vitara
  • Ошибка c1061 сузуки гранд витара
  • Ошибка c1058 приора эур
  • Ошибка c1058 лада приора

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии