title: How to change window size in C++?
body: <p>Hi I have to run a program in C++ and I want to make sure when the program is executed, it opens the console in a particular size/dimensions, so that the display in my program is proper. I need help as I don't know how to do it. I am using Dev C++ 5.42(Orwell). I tried using </p>
  
  <pre><code>#include&lt;iostream&gt; 
  #include&lt;windows.h&gt; 
  
  using namespace std; 
  
  SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); 
  
  int main(){ 
      cout&lt;&lt;"Hello World"; 
  }
  </code></pre>
  
  <p>and got an error</p>
  
  <pre><code>[Error] expected constructor, destructor, or type conversion before '(' token
  </code></pre>
  
  <p>I'm a beginner and hence I don't know much about these things. </p>