C/C++ Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingC/C++ Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 22nd, 2014, 05:03 PM
M.Haephrati M.Haephrati is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2014
Posts: 1 M.Haephrati User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 42 sec
Reputation Power: 0
A strange problem with Visual Studio (error C1075 and C2601)

Using Visual Studio 2013 C++, I got compilation errors that I couldn't explain.

The compilation errors were:

*main.cpp(325): error C2601: 'FLAG' : local function definitions are illegal

main.cpp(323): this line contains a '{' which has not yet been matched

main.cpp(326): fatal error C1075: end of file found before the left brace '{' at 'main.cpp(323)' was matched*


But there was nothing wrong with my code. I counted all brackets and the number matched. There weren't any function inside another function.


I solved it by removing all "//" comments from the source code. It seems that the reason for that is bad line formatting which causes the compiler to miss a line break, so the line after a comment is treated as a comment as well.

For example:

// This is a commentThis_is_a_line;


is treated as:


// This is a commentThis_is_a_line;



There are many posts of the net about similar problems and some even suggested that they could be caused by a memory (RAM) fault on the machine, so before you replace your RAM, just remove the comments and see...

- Michael Haephrati מיכאל האפרתי

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingC/C++ Help > A strange problem with Visual Studio (error C1075 and C2601)


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap