473,408 Members | 1,767 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

how to convert program from VB 6.0 to Vb 2010

3
I am having problem working in VB 2010. I used to write program in VB 6.0, things seems to be different in 2010.
anyone can help in quick way learning this environment. <stdio.h> is not working, I dont know how to see output in Console application. it keeps giving me error on opening the file " name.cpp"
thanks
Apr 29 '13 #1
5 1456
weaknessforcats
9,208 Expert Mod 8TB
Maybe you could post the error and also some of your C++ code that does the console display.
Apr 29 '13 #2
patty
3
Expand|Select|Wrap|Line Numbers
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. main ()
  5. {
  6.     char s1[15];
  7.     printf(" enter the name of the Author:       ");
  8.     scanf("%s", s1);
  9.     /*gets(s1);*/
  10.  
  11.     while (strcmp( s1, "John_Doe"))
  12.     {
  13.         if (!strcmp(s1, "kennedy"))
  14.         {    printf ( " The  books for the Authors named: %s is as follows:\n\n", s1);
  15.  
  16.             printf("  1- Google pocket book\n");
  17.             printf("  2- Information Science\n");
  18.         }
  19.          if (!strcmp (s1, "Sekaran"))
  20.          {
  21.  
  22.              printf ( " The  books for the Authors named: %s is as follows:\n\n", s1);
  23.  
  24.              printf ("  1- Research Methods for bussiness\n");
  25.  
  26.         }
  27.  
  28.         else
  29.         { printf(" The specified Author has no books listed\n\n");
  30.           printf("Enter the name of another Author:   ");
  31.         }
  32.  
  33.         scanf("%s", s1);
  34.  
  35.     }
  36.  
  37. }
  38.  
this is an example of a simple code, which runs through VB6.0 just fine, but now I want to start using Vb2010,and I am having problem seeing the output, or sometimes even building the program.by the way, I am making console application.
Apr 30 '13 #3
weaknessforcats
9,208 Expert Mod 8TB
It's something other than the code you have posted. main() should return an int but after making that change your posted code compiles OK using Visual Studio.NET 2008.

What errors are you getting?
Apr 30 '13 #4
patty
3
thanks for your help, you were right, I figured it out. the problem was due to the software itself, although "int" seems to be necessary in 2010 version where in 6.0 I always leave it out. it is working ok in 2010 now. again thanks for your comments.
also, should I really know anything about .NET environment to work on VS 2010? sorry about the title, I meant VS not VB because I was working on C programming not VB. but, I used to work alot on programming Vb, C, Pascal C++, forTRan. lisp ...for many years, before .NET. I have not done so several years now. anything I should learn about .NET?
May 1 '13 #5
weaknessforcats
9,208 Expert Mod 8TB
.NET is the Microsoft framework that runs programs compiled as Microsoft Intermediate Language (MSIL) files. These files are read by the "framework" and cmpiled to machine code on the fly at run time. This allows any programming language t be used to write framework code if that language has an MSIL compiler. Hence you have C++.NET, VB.NET, etc..

The C# language is the MSIL language of choice. Here is where all the action is today.
May 1 '13 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: joe | last post by:
Hi I have a little executable that has this description for the main procedure main(int argc, char **argv) is it possible to call the program from another program if i compile it as a lib? or do...
2
by: Steve Payne | last post by:
I have an Access97 Database on one PC and a 2nd PC that just need to be able to query the Database. Can I convert a program (that I wrote in Access97) to an .exe file for the 2nd PC? If so,...
40
by: Tameem | last post by:
hi my name is tameem. i am a new c programmer. in a c program i want to give input ""tameem"" and the output will be ""xdphhp"" in a short: the character ""a"" will be replaced by ""d"" i can...
0
by: Andy202 | last post by:
I have a program that sends and receives data via a TCP/IP socket, but I would like to convert this application to a Shared Library so that other programs can use this library to send() and receive()...
0
by: dragrid | last post by:
per query and result below - how can I get the current year in the first column which is avg time instead of year 1900 - I get first column (avg time) as a result of query below Thanks in advance...
1
by: titli | last post by:
Hi All, I have the following in every column as shown below.Could you please let me know the formala for calculating the hours between two dates with times ColumnK2 ColumnL2 ...
2
by: MrDeej | last post by:
Hello my good people! We have developed an application on the Access plattform for the last 3 years. Now we see that it has grown to a size where we would like to convert to standalone program...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.