473,840 Members | 1,538 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Incredibly simple graphics question

I want to do graphics with C++. Surprisingly, so far nobody has been
able to tell me anything helpful. How do I do it? Any input would be
greatly appreciated.

Jason
Jul 22 '05
13 2274
Ioannis Vranos <iv*@guesswh.at .grad.com> writes:
Mabden wrote:
Look into C# if you are on a MS platform.

Don't troll.


Can somebody please explain to me why we needed
a new language like C#?
--
Randy Yates
Sony Ericsson Mobile Communications
Research Triangle Park, NC, USA
ra*********@son yericsson.com, 919-472-1124
Jul 22 '05 #11

"Randy Yates" <ra*********@so nyericsson.com> wrote in message
news:xx******** *****@usrts005. corpusers.net.. .
Ioannis Vranos <iv*@guesswh.at .grad.com> writes:
Mabden wrote:
Look into C# if you are on a MS platform.

Don't troll.


Can somebody please explain to me why we needed
a new language like C#?


Because Microsoft wanted their own version of Java, after they fell out with
Sun.

john
Jul 22 '05 #12
"John Harrison" <jo************ *@hotmail.com> wrote in message
news:2u******** *****@uni-berlin.de...

"Randy Yates" <ra*********@so nyericsson.com> wrote in message
news:xx******** *****@usrts005. corpusers.net.. .
Mabden wrote:

> Look into C# if you are on a MS platform.
Can somebody please explain to me why we needed
a new language like C#?


Because Microsoft wanted their own version of Java, after they fell

out with Sun.


There is that. C# is VB.Net is Cobol.Net is Perl.Net is ... Your program
is "compiled" to a byte-code version that run on a virtual machine.
Sound familiar? C# is just one of the many "faces" that you can use.
Basically, they can add a new language anytime, I think Python is
coming, or may be here already. The first ones were VB and C#. I know
with C# you can still create a standard EXE, as well.

They have made a lot of changes to how web pages work. They've extended
objects like buttons and fields to have server-side capability, and
added other features. They are taking some of the things you had to do
with JavaScript and putting them back on the server - IF YOU WANT. The
new technology also allows the developer to still use JavaScript, so
nothing is taken away.

I think the idea is to remove some of the cross-browser problems by
allowing the programmer to do things that would be problematic to
support on older browsers or other browser incompatibiliti es, in a known
and modern way. The growing availability of DSL type connections means
that the traffic back to the server isn't as important as it once was.

One of the scary things is that Microsoft may implement some
functionality by sending the browser JavaScript for you. In other words,
a black box determines the user's browser and send the appropriate code.
You "write once, run everywhere". Hmmmm, I've got deja vue.

--
Mabden
Jul 22 '05 #13
Mabden wrote:
There is that. C# is VB.Net is Cobol.Net is Perl.Net is ... Your program
is "compiled" to a byte-code version that run on a virtual machine.
Sound familiar? C# is just one of the many "faces" that you can use.
Basically, they can add a new language anytime, I think Python is
coming, or may be here already. The first ones were VB and C#. I know
with C# you can still create a standard EXE, as well.

Or in other words, all languages have the same API. However C++ will
have more.

According to MS people, there will be more generics abilities available
to C++ than in other languages, and also C++ (with C++/CLI) is "correct
by default", while the other languages are "correct by explicit coding":
Deterministic destruction with objects in the stack, automatic compiler
creation of Dispose() including chaining calls to Dispose etc.

Consider also C++ templates, and what will be supported in the after
2005 version of VC++, objects of managed types in the unmanaged heap,
objects of unmanaged types in the managed heap, free mixing of managed
and unmanaged types, managed types inheriting from unmanaged types,
unmanaged types inheriting from managed types and various such
combinations, only available to C++.

Being vendor specific, VC++ 2005 will also provide OpenMP version 2
multithreading support (which you can download from
http://www.openmp.org) in addition to the standard .NET/CLI
multithreading, for hand tuning. Consider the code:
#include <vector>

int main()
{
using std::vector;
vector<int>some Vec(100);
#pragma omp for
for(vector<int> ::size_type i=0; i<someVec.size( ); ++i)
someVec[i]=10*i;
}

C:\c>cl /clr temp.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 14.00.41013
for Microsoft (R) .NET Framework version 2.00.41013.0
Copyright (C) Microsoft Corporation. All rights reserved.

temp.cpp
Microsoft (R) Incremental Linker Version 8.00.41013
Copyright (C) Microsoft Corporation. All rights reserved.

/out:temp.exe
temp.obj

C:\c>

With this #pragma directive of the OpenMP 2 standard, the programmer
provides the guarantee that each assignment is independent of the other
assignments, and thus the compiler creates separate threads for each
assignment, taking advantage of the possible presence of multiple
processors in a system.
Consider this under the view of the upcoming multicore processors in the
mainstream, due to tend of 2005 - beginning of 2006.
Of course, according to the ISO C++ standard unknown #pragmas are
ignored, and thus the above code has no problem of portability to
compiles that do not support OpenMP:
C:\MinGW\bin\g+ +.exe -std=c++98 -pedantic-errors -Wall
-fexpensive-optimizations -O3 -ffloat-store -mcpu=pentiumpro temp.cpp -o
temp.exe

temp.cpp: In function `int main()':
temp.cpp:11: warning: ignoring #pragma omp for

Also VC++ 2005 will support Profile Guided Optimization.

The above will not be available to the other MS .NET languages.

According to MS, C++ becomes the systems programming language of .NET.

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 22 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1330
by: Support | last post by:
Hello: Using asp.net (vb) and I dont want to use active X controls - just server side code. I have uploaded a gif file but I want to resample it to a smaller size like 100 by 100 and save it to a file - simple ? right ? Upload -> Original.gif resample save as ->resampled.gif
5
1585
by: fripper | last post by:
I have a VB 2005 app ... main window has a picture box control (picControl) .... I want to draw a rectangle in that control using GDI+ ... something like: Dim g as graphics = creategraphics|() Dim r as Rectangle Dim b as new system.drawing.solidbrush(system.drawing.color.red) r.x = 100 r.y = 100
4
1439
by: pcnerd | last post by:
I originally asked this question in the "classic" VB forum. It occured to me after I had sent it that I sent it to the wrong forum. Anyway! Here's the situation. I have VB.NET 2005 Express Edition. I have a 19" LCD monitor with the resolution set at 1280 by 1024. I want to create a graphics program, say, displaying fractals that will run with the form maximized. Are the XY coordinates on the form independent of the size & resolution of...
5
1423
by: Tim | last post by:
hi I used to do this Dim gfx As System.Drawing.Graphics = pic1.CreateGraphics gfx.FillEllipse blah blah blah to draw straight onto a form. but this is frowned up (slow).
6
3250
by: Chris Dunaway | last post by:
The method for printing documents in .Net can be confusing, especially for newer users. I would like to create a way to simplify this process. My idea would be implemented using a PrintDocument (much like the current model), but my PrintDocument would have a Pages collection such that each time you need to have an additional page, you would just add another page to the collection and then use the page object for the actual drawing etc. ...
15
1854
by: Hamed | last post by:
Have I posted the message to wrong newsgroup? Or Does the question is so much strage? Would someone please kindly direct me to a true newsgroup or resource? Best Regards Hamed
4
3121
by: Carsten Schmitt | last post by:
Hello, I want to draw a simple pixel (i.e. a red pixel in the center of the screen), which is always in the foreground - even when running a fullscreen application like a DirectX game. I need this as an easy entry for programming later a HUD, which shows several informations, like date, time, company logo, etc. Any help or just a simple code example would be appreciated.
1
1486
by: James Willmott | last post by:
If I have a question, about how to implement a graphics algorithm in C++, but not specifically related to getting the graphics on screen (that I can work out for myself). Would asking for help in the implemention ( asking things like whether I should use std::vector vs std::list for example ) be off topic here? Thanks, jw.
0
9699
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10665
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9444
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7839
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7023
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5685
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4498
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3139
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.