473,324 Members | 2,535 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,324 software developers and data experts.

What does a class in C++ look like in assembly?

If I defined a class in C++

class SomeClass
{
...
}

what would that look in assembly.
Sep 25 '10 #1

✓ answered by TamusJRoyce

C++ usually uses a two stage compiling process. One process compiles it into assembly, and then you can compile that file into a static library.

g++ -c hello.C
g++ hello.o -o hello

This is gnu MinGW (Windows)/gcc (Linux) solution.

If you are to view the hello.o, you can view the assembly.

Searching google or similar search engines for "microsoft visual studio c++ show assembly" has several hits on showing assembly and using assembly in your c++ code for visual studio.

If you are interested in assembly, try some masm and nasm tutorials.

4 2886
weaknessforcats
9,208 Expert Mod 8TB
You might compile the code and look at the assembly that was generated.

I don't expect any assembly from a class declaration. It's only when you actually create an object that code is generated.
Sep 26 '10 #2
How would I look at the assembly code if my compiler doesnt output readable any assembly code?
Sep 26 '10 #3
weaknessforcats
9,208 Expert Mod 8TB
What product are you using?

Most IDE have a project setting to show generated code underneath the line of C/C++ code.
Sep 26 '10 #4
TamusJRoyce
110 100+
C++ usually uses a two stage compiling process. One process compiles it into assembly, and then you can compile that file into a static library.

g++ -c hello.C
g++ hello.o -o hello

This is gnu MinGW (Windows)/gcc (Linux) solution.

If you are to view the hello.o, you can view the assembly.

Searching google or similar search engines for "microsoft visual studio c++ show assembly" has several hits on showing assembly and using assembly in your c++ code for visual studio.

If you are interested in assembly, try some masm and nasm tutorials.
Sep 26 '10 #5

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

Similar topics

1
by: gsb | last post by:
I need to link one of several JavaScript files into an application. I'm using php to pick the file and "pass it thru" (passthru) based on http_get_vars. What is the header I need to send? ...
2
by: serge calderara | last post by:
Dear all, I would like toi understand clearly what does that tag <Serialiaze> reaaly means and when to use it and how? I have seen it in many places thanks for your answer regards serge
1
by: shine | last post by:
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="shine.WebForm1" %> what does Inherits means in this tag, what is the use of it plz explain me regards...
5
by: Kunle Odutola | last post by:
Prototype.js is here: http://prototype.conio.net/
3
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
1
by: ad | last post by:
I find an assemblies section in web.config. There are some PublicKey in it. What do these PublicKey do? What does <assembliessession do? <assemblies> <add...
7
by: Sin Jeong-hun | last post by:
I have created a class library assembly (.dll) file. At the main GUI application, this assembly is referenced and used. But the problem is, if I redistribute these files with my application,...
0
by: what does herpes look like on a female | last post by:
what does herpes look like on a female zovirax cream joint pain acyclovir
3
by: Hongyu | last post by:
Hi, I am a newbie in C++. I saw a code like the below and don't understand it. class A { public: A();
20
tharden3
by: tharden3 | last post by:
Hey Bytes, I've been having a bit of trouble with my site. It is HTML Valid, at least as far as I can control. There are three errors that show up on the HTML Validator, but these are errors...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.