is there a way to convert gmsh file(.msh) to .vtk

is there a way to convert gmsh file(.msh) to .vtk
or could i use gmsh output a vtk file,
like

write("test.vtk");

Or I have to write a c++program to convert the msh file into a vtk file

ParaView has a Gmsh reader plugin, so you could use that, directly in ParaView GUI, or with a pvpython script, or by recovering the vtkGmshReader source from ParaView and use them in a custom C++ app.