theakhilarya's blog

By theakhilarya, history, 5 weeks ago, In English

I use Visual Studio 2019 for coding. I have been it till now for codeforces. But from yesterday whenever I am uploading my source file it shows this error. Can anyone help me fix this. Thank You.

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31321.278
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test\test.vcxproj", "{6C54A1FC-6190-4E26-B1BF-F567058944CF}"
EndProject


Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|x64 = Debug|x64
		Debug|x86 = Debug|x86
		Release|x64 = Release|x64
		Release|x86 = Release|x86
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{6C54A1FC-6190-4E26-B1BF-F567058944CF}.Debug|x64.ActiveCfg = Debug|x64
		{6C54A1FC-6190-4E26-B1BF-F567058944CF}.Debug|x64.Build.0 = Debug|x64
		{6C54A1FC-6190-4E26-B1BF-F567058944CF}.Debug|x86.ActiveCfg = Debug|Win32
		{6C54A1FC-6190-4E26-B1BF-F567058944CF}.Debug|x86.Build.0 = Debug|Win32
		{6C54A1FC-6190-4E26-B1BF-F567058944CF}.Release|x64.ActiveCfg = Release|x64
		{6C54A1FC-6190-4E26-B1BF-F567058944CF}.Release|x64.Build.0 = Release|x64
		{6C54A1FC-6190-4E26-B1BF-F567058944CF}.Release|x86.ActiveCfg = Release|Win32
		{6C54A1FC-6190-4E26-B1BF-F567058944CF}.Release|x86.Build.0 = Release|Win32
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
	GlobalSection(ExtensibilityGlobals) = postSolution
		SolutionGuid = {3B3C5184-DF9A-4834-A3AB-7986C56EB7DF}
	EndGlobalSection
EndGlobal
 
 
 
 
  • Vote: I like it
  • +8
  • Vote: I do not like it

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Use sublime text,its the best editor ever !

Spoiler
»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Your post is actual error message you get from CF?

Can you share your submission?

  • »
    »
    5 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yes, the error message is from Codeforces. The program works fine in VS 2019.

    • »
      »
      »
      5 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Submission?

      • »
        »
        »
        »
        5 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Problem — A. Insomnia cure My Code

        #include <iostream>
        #include <vector>
        using namespace std;
         
        int main()
        {
        	int k, l, m, n, d, count = 0;
        	cin >> k >> l >> m >> n >> d;
        	for (int i = 1; i <= d; i++)
        	{
        		if (i % k == 0)
        			count++;
        		else if (i % l == 0)
        			count++;
        		else if (i % m == 0)
        			count++;
        		else if (i % n == 0)
        			count++;
        	}
        	cout << count;
         
        	return 0;
        }
        

        Checker Log from Codeforces

        Can't compile file:
        program.cpp:3:3: error: invalid preprocessing directive #Visual
         # Visual Studio Version 16
           ^~~~~~
        program.cpp:4:23: error: too many decimal points in number
         VisualStudioVersion = 16.0.31321.278
                               ^~~~~~~~~~~~~~
        program.cpp:5:30: error: too many decimal points in number
         MinimumVisualStudioVersion = 10.0.40219.1
                                      ^~~~~~~~~~~~
        program.cpp:2:1: error: 'Microsoft' does not name a type
         Microsoft Visual Studio Solution File, Format Version 12.00
         ^~~~~~~~~
        program.cpp:16:41: error: expected unqualified-id before '.' token
           {6C54A1FC-6190-4E26-B1BF-F567058944CF}.Debug|x64.ActiveCfg = Debug|x64
                                                 ^
        program.cpp:17:41: error: expected unqualified-id before '.' token
           {6C54A1FC-6190-4E26-B1BF-F567058944CF}.Debug|x64.Build.0 = Debug|x64
                                                 ^
        program.cpp:18:41: error: expected unqualified-id before '.' token
           {6C54A1FC-6190-4E26-B1BF-F567058944CF}.Debug|x86.ActiveCfg = Debug|Win32
                                                 ^
        program.cpp:19:41: error: expected unqualified-id before '.' token
           {6C54A1FC-6190-4E26-B1BF-F567058944CF}.Debug|x86.Build.0 = Debug|Win32
                                                 ^
        program.cpp:20:41: error: expected unqualified-id before '.' token
           {6C54A1FC-6190-4E26-B1BF-F567058944CF}.Release|x64.ActiveCfg = Release|x64
                                                 ^
        program.cpp:21:41: error: expected unqualified-id before '.' token
           {6C54A1FC-6190-4E26-B1BF-F567058944CF}.Release|x64.Build.0 = Release|x64
                                                 ^
        program.cpp:22:41: error: expected unqualified-id before '.' token
           {6C54A1FC-6190-4E26-B1BF-F567058944CF}.Release|x86.ActiveCfg = Release|Win32
                                                 ^
        program.cpp:23:41: error: expected unqualified-id before '.' token
           {6C54A1FC-6190-4E26-B1BF-F567058944CF}.Release|x86.Build.0 = Release|Win32
                                                 ^
        program.cpp:30:2: error: 'EndGlobalSection' does not name a type
          EndGlobalSection
          ^~~~~~~~~~~~~~~~
        
        • »
          »
          »
          »
          »
          5 weeks ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Looks like you trying to send your text from post as source code, instead of text from comment

          • »
            »
            »
            »
            »
            »
            5 weeks ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            Thanks, I solved it. I was uploading the wrong file.