Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


C++ or C# for a beginner?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Wintermoot
Expert Cheater
Reputation: 0

Joined: 08 Nov 2007
Posts: 198

PostPosted: Fri Aug 22, 2008 2:54 am    Post subject: Reply with quote

Hieroglyphics wrote:
I recommend C++. I have never personally tried much with C# but I know it is good to learn both, because there are pros and cons to both. If you would like to make trainers and stuff then I suggest using like C++ for a dll and if u want a GUI use C# for the GUI is what ElJeffro said to do.


You can just use C++.NET for GUI's...
Back to top
View user's profile Send private message
pkedpker
Master Cheater
Reputation: 1

Joined: 11 Oct 2006
Posts: 412

PostPosted: Fri Aug 22, 2008 3:04 am    Post subject: Reply with quote

.NET is like 20 mb package you download from microsoft without it you can"t run .NET programs like vb.net c# c++.net anything using .NET

C++ uses runtime dlls too but they are like 2 mb for all.. and mostly come with computer.

.net is interpected langauge like old vb6 it doesn' compile to native so it doesn't use the real power of machine code assembly. its like a wrapper on top of a scripting engine and scripting engine makes everything have delays of course so its all garbage its just good to start learning.. so u can pick up other easily.

_________________
Hacks I made for kongregate.
Kongregate Universal Badge Hack: http://forum.cheatengine.org/viewtopic.php?p=4129411
Kongreate Auto Rating/Voter hack: http://forum.cheatengine.org/viewtopic.php?t=263576
Took a test lol
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Fri Aug 22, 2008 3:14 am    Post subject: Reply with quote

pkedpker wrote:
.NET is like 20 mb package you download from microsoft without it you can"t run .NET programs like vb.net c# c++.net anything using .NET

C++ uses runtime dlls too but they are like 2 mb for all.. and mostly come with computer.

.net is interpected langauge like old vb6 it doesn' compile to native so it doesn't use the real power of machine code assembly. its like a wrapper on top of a scripting engine and scripting engine makes everything have delays of course so its all garbage its just good to start learning.. so u can pick up other easily.


what

no.
Back to top
View user's profile Send private message
jackyyll
Expert Cheater
Reputation: 0

Joined: 28 Jan 2008
Posts: 143
Location: here

PostPosted: Fri Aug 22, 2008 4:47 am    Post subject: Reply with quote

Slugsnack wrote:
jackyyll wrote:
Slugsnack wrote:
C++ is not cross-platform (not properly anyway) ? If you intend to just program on Windows systems, I advise C++.


Think you got that backwards... C# isn't that portable..

Oh really ? Could be the case Razz I just seem to remember reading that Java + C# were the more portable versions of C++. I recall reading C++ would be faster because it has none of the intermediate translation overhead (eg. for Java = bytecode conversion in its Virtual Machine and for C# = MSIL/CIL (Microsoft/Common Intermediate Language) which is then assembled to bytecode .NET assembly equivalent created and then run through a .NET runtime). Cause I then thought as long as the machine was able to install the respective runtime, it could run files created by that language. Of course, as you say I am probably wrong. I will check again later.



Yeah, C++ will run on all operating systems ( standard C++.. Obviously can't use windows.h on linux Razz ). But, C# will run on linux but you need to use a framework for linux called Mono which isn't fully implemented yet so it's not 100% portable.
Back to top
View user's profile Send private message AIM Address MSN Messenger
Fredd
Expert Cheater
Reputation: 0

Joined: 18 Mar 2008
Posts: 240
Location: Somewhere past the rainbow, past the gold.....

PostPosted: Fri Aug 22, 2008 8:40 am    Post subject: Reply with quote

Symbol wrote:
Fredd wrote:
Noob question.....

(I'm gonna feel SO retarded.)

I got VC++08 a while ago, and started to do some stuff with it.
Thing is, I can't see the hello world thing, or anything else. (I've just been going along as compiling whats I do to see if I got it right, by now.)
Every time I debug the program, I see the window but can't read it. I know it pops up, but I can't read it. I got to a thing where you use the 'cin' and that shows up, but the result doesn't, it disappears too fast to see it.

Is it just like that, or what?

Wait for user input:
Code:
std::cin.get(); std::cin.ignore();

Will do the job.


I think I see what you're saying, but I don't think you got what I said.
It's not that a literal cin comes up.... (thinking of how to explain)

Alright. So the code (basically) is
cout << enter length;
cin >> length;
cout << enter width;
cin >> width;
cout << length*width;
(I left ALOT out, I know. Don't wanna go find it, I'm on my other comp atm.)

I see the "enter length/width" and I can enter them, but I can't see the result because it disappears.

_________________
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Fri Aug 22, 2008 8:43 am    Post subject: Reply with quote

I already told you what to do.
Your program closes because it has reached the end, means no more code to execute, means it's the end. Neutral
Back to top
View user's profile Send private message
Fredd
Expert Cheater
Reputation: 0

Joined: 18 Mar 2008
Posts: 240
Location: Somewhere past the rainbow, past the gold.....

PostPosted: Fri Aug 22, 2008 10:51 pm    Post subject: Reply with quote

Well, is there a way to keep it open?
_________________
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Fri Aug 22, 2008 11:58 pm    Post subject: Reply with quote

cin.sync()
cin.ignore()
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Sat Aug 23, 2008 4:13 am    Post subject: Reply with quote

Just let it run through like it should Rolling Eyes.
Back to top
View user's profile Send private message MSN Messenger
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8588
Location: 127.0.0.1

PostPosted: Sat Aug 23, 2008 7:13 am    Post subject: Reply with quote

Symbol wrote:
Fredd wrote:
Noob question.....

(I'm gonna feel SO retarded.)

I got VC++08 a while ago, and started to do some stuff with it.
Thing is, I can't see the hello world thing, or anything else. (I've just been going along as compiling whats I do to see if I got it right, by now.)
Every time I debug the program, I see the window but can't read it. I know it pops up, but I can't read it. I got to a thing where you use the 'cin' and that shows up, but the result doesn't, it disappears too fast to see it.

Is it just like that, or what?

Wait for user input:
Code:
std::cin.get(); std::cin.ignore();

Will do the job.


Code:
std::cin.sync();
std::cin.ignore();


Is more preferred.

pkedpker wrote:
NET is like 20 mb package you download from microsoft without it you can"t run .NET programs like vb.net c# c++.net anything using .NET

C++ uses runtime dlls too but they are like 2 mb for all.. and mostly come with computer.

.net is interpected langauge like old vb6 it doesn' compile to native so it doesn't use the real power of machine code assembly. its like a wrapper on top of a scripting engine and scripting engine makes everything have delays of course so its all garbage its just good to start learning.. so u can pick up other easily.


Uh.. no? Think you need to go reread some things.

Slugsnack wrote:
C++ is not cross-platform (not properly anyway) ? If you intend to just program on Windows systems, I advise C++.


It is, but, different operating systems, compilers, companies, etc. have added on their own objects into C++ to be used for their specific operating system. Some things that you will find on Windows wont be the same on Linux, or will be found in different headers.

Like pointed out above, windows.h does not exist on Linux, and is handled based on which headers you need. windows.h is just an easier way to avoid including a ton of headers and setting macro definitions yourself on Windows.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Fredd
Expert Cheater
Reputation: 0

Joined: 18 Mar 2008
Posts: 240
Location: Somewhere past the rainbow, past the gold.....

PostPosted: Sat Aug 23, 2008 9:38 am    Post subject: Reply with quote

Wiccan wrote:


Code:
std::cin.sync();
std::cin.ignore();


Is more preferred.



2 things:
Where exactly does it go, and what does it do?
I'd like to know if thats what makes it do what I want.

_________________
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sun Aug 24, 2008 11:26 am    Post subject: Reply with quote

jackyyll wrote:
Slugsnack wrote:
jackyyll wrote:
Slugsnack wrote:
C++ is not cross-platform (not properly anyway) ? If you intend to just program on Windows systems, I advise C++.


Think you got that backwards... C# isn't that portable..

Oh really ? Could be the case Razz I just seem to remember reading that Java + C# were the more portable versions of C++. I recall reading C++ would be faster because it has none of the intermediate translation overhead (eg. for Java = bytecode conversion in its Virtual Machine and for C# = MSIL/CIL (Microsoft/Common Intermediate Language) which is then assembled to bytecode .NET assembly equivalent created and then run through a .NET runtime). Cause I then thought as long as the machine was able to install the respective runtime, it could run files created by that language. Of course, as you say I am probably wrong. I will check again later.



Yeah, C++ will run on all operating systems ( standard C++.. Obviously can't use windows.h on linux Razz ). But, C# will run on linux but you need to use a framework for linux called Mono which isn't fully implemented yet so it's not 100% portable.


Wiccaan wrote:
It is, but, different operating systems, compilers, companies, etc. have added on their own objects into C++ to be used for their specific operating system. Some things that you will find on Windows wont be the same on Linux, or will be found in different headers.

Like pointed out above, windows.h does not exist on Linux, and is handled based on which headers you need. windows.h is just an easier way to avoid including a ton of headers and setting macro definitions yourself on Windows.


This is why I was confused by it Razz :
http://download.microsoft.com/download/7/3/7/7374dd3f-be0e-4fc1-ac9b-e3d652194687/C++%20Beginner's%20Guide%20CH01.xps

Read that recently (learning C++ right now). If you scroll down to "CRITICAL SKILL 1.2: How C++ Relates to Java and C#", it says this :
Quote:
The main difference between C++, Java, and C# is the type of computing environment for which each is designed. C++ was created to produce high-performance programs for a specific type of CPU and operating system. For example, if you want to write a program that runs on an Intel Pentium under the Windows operating system, then C++ is the best language to use.


And then it says this :
Quote:
Q: How do Java and C# create cross-platform, portable programs, and why can’t C++ do the same?
A: Java and C# can create cross-platform, portable programs and C++ can’t because of the type of object code produced by the compiler. In the case of C++, the output from the compiler is machine code that is directly executed by the CPU. Thus, it is tied to a specific CPU and operating system. If you want to run a C++ program on a different system, you need to recompile it into machine code specifically targeted for that environment. To create a C++ program that would run in a variety of environments, several different executable versions of the program are needed. Java and C# achieve portability by compiling a program into a pseudocode, intermediate language. In the case of Java, this intermediate language is called bytecode. For C#, it is called Microsoft Intermediate Language (MSIL). In both cases, this pseudocode is executed by a runtime system. For Java, this runtime system is called the Java Virtual Machine (JVM). For C#, it is the Common Language Runtime (CLR). Therefore, a Java program can run in any environment for which a JVM is available, and a C# program can run in any environment in which the CLR is implemented. Since the Java and C# runtime systems stand between a program and the CPU, Java and C# programs incur an overhead that is not present in the execution of a C++ program. This is why C++ programs usually run faster than the equivalent programs written in Java or C#.


That is why I said I did not think it was 'properly cross-platform' since different executables need to be made for each different system (or so I have been led to believe). Thanks for your answers though Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites