Language: C++

using System;
using System.Linq;
using System.Collections.Generic;

namespace _0030
{
    class Gyo
    {
        internal int dot;
        internal int sharp;

        public Gyo()
        {
            this.dot = 0;
            this.sharp = 0;
        }
    }

    class Program
    {

        
        static void Main(string[] args)
        {

            string[] str = Console.ReadLine().Split(' ');

            int n = int.Parse(str[0]);
            int m = int.Parse(str[1]);

            char[,] data = new char[n, m];

            var delete_i =new List<int>();  //取り除く行
            var delete_j =new List<int>();  //取り除く列
            var gyo_delete_j = new Gyo[m];  //各列が削除対処かどうかの判断

            //gyo_delete_jのインスタンスを作成
            for(int j = 0; j < m; j++)
            {
                gyo_delete_j[j] = new Gyo();
            }

            int count_dot = 0;
            
            string strer;

            //i行j列
            for(int i = 0; i < n; i++)
            {
                strer = Console.ReadLine();
                count_dot = 0;
                
                for(int j = 0; j < m; j++)
                {
                    data[i, j] = strer[j];

                    //ドットとシャープをカウント
                    //ドットとシャープがあったら1で存在を証明
                    if(strer[j] == '.')
                    {
                        count_dot++;
                        gyo_delete_j[j].dot = 1;
                    }
                    else
                    {                      
                        gyo_delete_j[j].sharp = 1;
                    }

                    //取り除く行
                    //m個ならんでたら取り除く
                    if(count_dot == m)
                    {                      
                        delete_i.Add(i);
                    }
                    
                }        
            }

            //削除する列の発見
            for(int j = 0; j < m; j++)
            {
                //どっちも1（存在している）だったら削除しない
                if(gyo_delete_j[j].dot == 1 && gyo_delete_j[j].sharp == 0)
                {
                    delete_j.Add(j);
                }
                
            }

            //Console.WriteLine();           

            //削除する行と列以外を表示
            for(int i = 0; i < n; i++)
            {
                if (delete_i.Contains(i))
                {
                    continue;
                }
                for(int j = 0; j < m; j++)
                {
                    if (delete_j.Contains(j))
                    {
                        continue;
                    }
                    Console.Write(data[i, j]);
                }
                Console.WriteLine();
            }

        }
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Linq;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:9:9: error: 'internal' does not name a type
    9 |         internal int dot;
      |         ^~~~~~~~
a.cc:10:9: error: 'internal' does not name a type
   10 |         internal int sharp;
      |         ^~~~~~~~
a.cc:12:15: error: expected ':' before 'Gyo'
   12 |         public Gyo()
      |               ^~~~
      |               :
a.cc:17:6: error: expected ';' after class definition
   17 |     }
      |      ^
      |      ;
a.cc: In constructor '_0030::Gyo::Gyo()':
a.cc:14:18: error: request for member 'dot' in '(_0030::Gyo*)this', which is of pointer type '_0030::Gyo*' (maybe you meant to use '->' ?)
   14 |             this.dot = 0;
      |                  ^~~
a.cc:15:18: error: request for member 'sharp' in '(_0030::Gyo*)this', which is of pointer type '_0030::Gyo*' (maybe you meant to use '->' ?)
   15 |             this.sharp = 0;
      |                  ^~~~~
a.cc: At global scope:
a.cc:23:26: error: 'string' has not been declared
   23 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:23:35: error: expected ',' or '...' before 'args'
   23 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:111:6: error: expected ';' after class definition
  111 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void _0030::Program::Main(int*)':
a.cc:26:13: error: 'string' was not declared in this scope
   26 |             string[] str = Console.ReadLine().Split(' ');
      |             ^~~~~~
a.cc:26:20: error: expected primary-expression before ']' token
   26 |             string[] str = Console.ReadLine().Split(' ');
      |                    ^
a.cc:28:21: error: expected primary-expression before 'int'
   28 |             int n = int.Parse(str[0]);
      |                     ^~~
a.cc:29:21: error: expected primary-expression before 'int'
   29 |             int m = int.Parse(str[1]);
      |                     ^~~
a.cc:31:18: error: expected identifier before ',' token
   31 |             char[,] data = new char[n, m];
      |                  ^
a.cc:31:18: error: expected ']' before ',' token
a.cc:31:17: error: structured binding declaration cannot have type 'char'
   31 |             char[,] data = new char[n, m];
      |                 ^
a.cc:31:17: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:31:17: error: empty structured binding declaration
a.cc:31:21: error: expected initializer before 'data'
   31 |             char[,] data = new char[n, m];
      |                     ^~~~
a.cc:33:13: error: 'var' was not declared in this scope
   33 |             var delete_i =new List<int>();  //取り除く行
      |             ^~~
a.cc:34:17: error: expected ';' before 'delete_j'
   34 |             var delete_j =new List<int>();  //取り除く列
      |                 ^~~~~~~~
a.cc:35:17: error: expected ';' before 'gyo_delete_j'
   35 |             var gyo_delete_j = new Gyo[m];  //各列が削除対処かどうかの判断
      |                 ^~~~~~~~~~~~
a.cc:40:17: error: 'gyo_delete_j' was not declared in this scope
   40 |                 gyo_delete_j[j] = new Gyo();
      |                 ^~~~~~~~~~~~
a.cc:45:20: error: expected ';' before 'strer'
   45 |             string strer;
      |                    ^~~~~
a.cc:50:17: error: 'strer' was not declared in this scope
   50 |                 strer = Console.ReadLine();
      |                 ^~~~~
a.cc:50:25: error: 'Console' was not declared in this scope
   50 |                 strer = Console.ReadLine();
      |                         ^~~~~~~
a.cc:55:21: error: 'data' was not declared in this scope
   55 |                     data[i, j] = strer[j];
      |                     ^~~~
a.cc:62:25: error: 'gyo_delete_j' was not declared in this scope
   62 |                         gyo_delete_j[j].dot = 1;
      |                         ^~~~~~~~~~~~
a.cc:66:25: error: 'gyo_delete_j' was not declared in this scope
   66 |                         gyo_delete_j[j].sharp = 1;
      |                         ^~~~~~~~~~~~
a.cc:73:25: error: 'delete_i' was not declared in this scope
   73 |                         delete_i.Add(i);
      |                         ^~~~~~~~
a.cc:83:20: error: 'gyo_delete_j' was not declared in this scope
   83 |                 if(gyo_delete_j[j].dot == 1 && gyo_delete_j[j].sharp == 0)
      |                    ^~~~~~~~~~~~
a.cc:85:21: error: 'delete_j' was not declared in this scope
   85 |                     delete_j.Add(j);
      |                     ^~~~~~~~
a.cc:95:21: error: 'delete_i' was not declared in this scope
   95 |                 if (delete_i.Contains(i))
      |                     ^~~~~~~~
a.cc:101:25: error: 'delete_j' was not declared in this scope
  101 |                     if (delete_j.Contains(j))
      |                         ^~~~~~~~
a.cc:105:21: error: 'Console' was not declared in this scope
  105 |                     Console.Write(data[i, j]);
      |                     ^~~~~~~
a.cc:105:35: error: 'data' was not declared in this scope
  105 |                     Console.Write(data[i, j]);
      |                                   ^~~~
a.cc:107:17: error: 'Console' was not declared in this scope
  107 |                 Console.WriteLine();
      |                 ^~~~~~~