Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

c++ script help

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
#include <iostream.h>

int main ()
{
int selection;
cout << &quot;Insert 1 for pak 1 or 2 for pak 2. \n&quot;;
cin >> selection;
if (selection == 1)
cout << &quot;Created Pak 1 \n&quot;;
public static void rename( String C:\Dev-C++\tests\t1.dev, String C:\Dev-C++\tests\newdev.dev );
else if (selection == 2)
cout << &quot;Created Pak 2 \n&quot;;
else
cout << &quot;Invalid Command \n&quot;;
cin >> selection;
int exit;
cin >> exit;
return 0;
}
 
Okay, I have MS Visual C++ installed. Can you get me started with steps on which files and what type of project to create and what they are for?
 
Okay, the second &quot;dialog&quot; tutorial works. I did what it said and the first script generated the box. But when I try and run the other scripts below, they generate errors while compiling and building.
 
c:\program files\microsoft visual studio\myprojects\test1\source.cpp(1) : error C2146: syntax error : missing ';' before identifier 'MainDialog_OnCommand'
c:\program files\microsoft visual studio\myprojects\test1\source.cpp(1) : error C2501: 'BOOL' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\myprojects\test1\source.cpp(1) : fatal error C1004: unexpected end of file found
 
c:\program files\microsoft visual studio\myprojects\test1\source.cpp(1) : error C2146: syntax error : missing ';' before identifier 'MainDialog_OnCommand'
c:\program files\microsoft visual studio\myprojects\test1\source.cpp(1) : error C2501: 'BOOL' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\myprojects\test1\source.cpp(1) : fatal error C1004: unexpected end of file found
 
Can you post the code so i can see which one you are dealing with ?
 
I'm using the other tutorial, now. The code was:

BOOL MainDialogProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_CLOSE:
EndDialog(hWnd, 0);
return TRUE;
}
return FALSE;
}
 
There is no problem with the part of the code that you have post.By the way,in case you have'nt notice,you can always download the entire code for each part of the first tutorial.You just have to click on one of the two arrows that you can find in the beginning of each text.
 
Damn! Windows programming is HARD! Console/Windows is semi-hard, while console is fairly simple to get the hang of. Any idiot's guide to Windows programming out there? I find idiot's guides somewhat helpful.
 
Well,it's always like that when you first started to learn windows programming.You got to be patient with it,you can't learn it all in a few days.But if you keep practicing,this notion are going to become familiar to you sooner or later.About idiot's guide,i dont know any of those.But i understand your frustration !
 
The guy in the second tutorial used C, not C++. I downloaded the zip file and opened the C source file. When I tried to build it, two errors came up. Do you know another tutorial which has a guy using C++?
 
But that's console programming. I needed Visual Basics. Is Visual Basics only programmed in C++/C?
 
Are you talking about Visual C++ because Visual Basic it's a all diferent thing ?
 
Does Visual Basics create Windows applications? If so, can you give me the specs?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top