Saturday, May 22, 2010

Should I learn C Sharp?

I am a trader who programs to get by, I am not a programmer by trade. I am very familiar with Visual Basic Version 6 and VBA. I have just installed Visual Studio 2005. Should I start leaning and coding in C# instead or should I stick to VB.NET? I need a good reason why for 10 points.

Should I learn C Sharp?
Well you have a background in VB6, it means that you are familiar with VB Syntax, signatures and many language constructs. I suggest that you should stick to VB.NET because its better to continue syntax that you already know rather than learning entirely new thing C#.NET.





Moreover, VB.NET have the same powers that C# has, even simpler than C#, while having same support from Microsoft that C# does enjoy.





Saif Ullah





http://www.kasamba.com/Saif-Ullah
Reply:for me, coming from a vb 6 background, trying to learn vb.net was a disaster. learning C# however, was cake walk. The syntax is much simpler in C# than vb.net as vb.net is annoyingly wordy.





C# may look a little different, but its easier in my opionion that vb.net.





a sample:


Private Function Foo() As Integer


Dim myVar As Integer


'some comment


Foo = 1 'i'm not even sure if thats right.. lol


End Function





is this in C#


private int Foo()


{


int MyVar;


//some comment


return 1;


}








once you get the basic sructure of C# down (took me a day of messing with it) your good to go. It might take you a little bit to get a hang of, but learning C# in my opinion is a much better idea

customer survey

Help with C++ Compiler?

Hi, how can i compile a C++ program were my friends can use it without


having to download any additional software.





I have been using microsoft visual studio 2008 but the only way my friends are


able to execute that file is by downloading visual studio also.





- What is the best compiler to use for C++ and were can i find some help


getting it set up, because i used the code::blocks compiler early today and it


seems as though you have to have a diffrent compiler like microsoft 2008 or


the gnu compiler... All i want is some information like that.





- also how do you add an icon to your C++ file that you compiled.





My Friends and Family are either running windows XP or Vista so my main goal is to


get a compiler to were there operating system already contains the nessessary files


to run the compiled C++ program.





I am farly new to C++ if you can not tell.





Thanks in advance.

Help with C++ Compiler?
You do have everything. VS is all you need.





In VS go to the build options. In the options, set the build to "release" and not debug.





If you are writing a MFC program (don't think so; however, just in case), look under the project settings tab build configuration and set to "statically linked MFC library" instead of "dynamically linked." This second step will bind the MFC library to your exe (this one is different on different win machines).





Probably step 1 will solve your problem.





Now, just copy the ".exe" file from your \release\ folder and give it away. You're good to go.





Good luck.





EDIT: just saw the icon reference. In the project resource viewer, open the icon folder. There should be a program icon already in the folder--edit away. Or you can add a new one and do some whiz bang graphics with it!
Reply:You are really lost. Try worrying less for a start. Then know this...once you compile a C++ program, you can run the exe file on almost any computer that is MS compatible.





Try Visual Studio
Reply:You should be able to compile a program on VS express that runs on any Windows computer. You need to be sure you're building a .exe file. In VS 2008 it may require that .Net 3.0 or later is required on the target system (your family's and friend's) They can download this from Microsoft. Also you can build debug or release version in VS you should build release versions for other computers. If your program still require them to have VS to run then you need to look at your build settings and references. Make sure that you are building an exe file and that the references don't refer to something you aren't expecting in the target environment.


How can i remove the penalty of access violation in c programming?

I use microsoft visual studio 6.0 in writing my code in c, and i has a problem when dynamically allocating a large size of memory, the error is access violation to memory. the answer is how can i getride of this problem

How can i remove the penalty of access violation in c programming?
Do u deallocate memory (i.e. use free) each time u allocate some ?
Reply:Check for null or bad pointers in your program.


It sounds like your program has a bug where you are trying to access a bad memory location.
Reply:The access violation error is caused when you access memory that is NOT allocated to the program. This could be caused by a null or zero pointer.





Double check your pointer allocation that it is set to point to the allocated memory.
Reply:Post the buggy code so we can take a look.


I am trying to debug a "Hello World" console application but as soon as the console pops up it goes away.why?

OS: Windows Vista (using mostly default settings)


Language/IDE: C#/Visual Studio Express Editions





I can see that it is printing hello world but the window only stays up for a fraction of a second. How can I change it so that it stays up until I close it?





THANKS!

I am trying to debug a "Hello World" console application but as soon as the console pops up it goes away.why?
It is absolutely fine, it's just that windows closes the console when it's done; if you opened up your own console and run it from the console it wouldn't close. To prevent this when running it graphically(by just clicking it), you usually would use a getchar thing or something or in c you would do a system("pause") on window.s
Reply:have it wait for a keypress to exit.





Not sure what it would be in c# but maybe getchar or something.


Please help me....... i will do anything(i mean any thing just ask)if u do?

*/my e-mail address is cherryseifu@yahoo.com or cherryseifu@hotmail.com*/





i have this assignment on the next day .the assignment is to write a program in C++,visual studio,


1.


that stores student data of number of students as structure(student ID, student name, age %26amp; CGPA)can insert, sort,delete any of the datas. it is better to put them as a dynamic pointer to delete.


2.and program that enables to add ,subtract or multiply two matrix


the operation are choosen by the user %26amp; the matrix data isgiven by the user.

Please help me....... i will do anything(i mean any thing just ask)if u do?
....anything??....Hmmmmm!
Reply:http://www.freeprogrammingresources.com/...
Reply:For the first one, a doubly linked list is probably the easiest thing to do. Just create a data structure with all of the data you need and pointers to prev and next members. Then as the user adds or deletes records, you can keep them in whatever sorted order you want just by modifying the prev and next pointers of the correct records. You can also dynamically sort the data on any field in the structure. There is a lot of material on the net about linked lists; but this should give you a starting point..


Hope this helps..
Reply:1. U have asked if to use linked list or not. I would say yes. but kkep in mind that you de-allocate the memory when it is done.Otherwise u will be in deep **** cos the pointers use a hell lot of resources. you might also use a deque(double ended queue) with pointer implementation for the same.





2.About the matrix addition use an array and make the life a lot simpler. Accept the values in a loop and read em the same way.





I hope i have made it a lot more simpler that it actually sounds right!!





thanks


Barry
Reply:1: Whats wrong with just using the STL types, no need to be reinventing (and debugging) things like linked lists when you allready have a tried and tested implementation on the box.





2: Looks kind of trivial (if tedious to write), post your code and the error messages and someone will have a look.





Regards, Dan.

survey for cash

Opera Default Browser One Program?

How do i make Opera my default web browser for just one program?





It whould help if you knew how to do this in either C# (Visual Studio) or opera web browser itself





thanks

Opera Default Browser One Program?
If you want to launch opera from your own C# program I would do the following:





// This goes at the top of the code module


Using System.Diagnostics;





// This would go in a method somewhere


// strPathToOpera is the location of the Opera executable


// strHTMLFileToOpen would be the full path location to


// the HTML file to load or a URL


ProcessStartInfo udtInfo = new ProcessStartInfo();


udtInfo.FileName = strPathToOpera;


udtInfo.Arguments = strHTMLFileToOpen;





Process procOpera = Process.Start(udtInfo);





// If you want to wait until the browser closes to continue, then


// uncomment the next line.


//procOpera.WaitForExit();
Reply:http://my.opera.com/Tamil/blog/set-opera...








http://www.opera.com/support/tutorials/s...





this link will show you how...


hope this help!!!


C# compiler?

Should I go with visual studio? I'm not familiar with the poor C#. Any other recommendation for a good looking brutal IDE for C#? Like netbeans/Jbuilder for Java...

C# compiler?
I am using the full version of Visual Studio but there are other free ones:


http://www.thefreecountry.com/compilers/...
Reply:C# Express (really, MSDev, the same host application for all the .Net languages) does have a lot of menus and windows and options, but you'll find that you primarily only use some of them. And MSDN does have a lot of tutorials and documentation that goes over the IDE. I'd go with C# Express, you'll probably pick it up in a week or two.
Reply:VS is the best! You can even get a version for free





http://msdn.microsoft.com/vstudio/expres...





I have been using it for a long time and never had a reson to look at another C# compiler.