Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:
I want C++ coding in Html, is it possible ?
Posted
Updated 13-May-11 19:51pm
v2

Your question is very vague, so let me answer the question "How to interact with HTML using C++?"

1. The most obvious way is to emit HTML using a program written in C++. Example: XHtmlLog - Convert text log files to HTML[^]

2. Next, you could write an addin for a browser using C++. I have not done this personally, but I'm sure google will have many hits.

3. You could host the Microsoft HTML control in a program using C++. There are some articles here on CodeProject that discuss this.

4. You could access the HTML DOM hierarchy of a browser using Microsoft's MSAA accessibility SDK. This allows you to view the elements and properties of a HTML document.

5. You want to display some C++ code on a HTML page, with syntax coloring. There are some articles here on that topic.

If you can provide more information as to what you're trying to do, we will be able to help you better.
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 14-May-11 17:25pm    
Did you do your best to attribute at least some sense to something which does not have sense at all? If so, you're pretty inventive, my 5.

I decided to complement this exercise with just one more item.
Please see, hope you find it funny.
--SA
Hans Dietrich 14-May-11 18:41pm    
I did my best to understand that the OP had a real question. I don't think a lack of vocabulary should be penalized. So, as always, I believe there is no such thing as a bad question, although in this case it could have been phrased a little better.
Sergey Alexandrovich Kryukov 16-May-11 3:56am    
Your opinion of question if kind of unusual. Ideally, you may be right, but, taking into account limited resources, having questions of different quality (more importantly, lazy and good hard-working people) and other factor, some questions are steeling attention from good ones. You cannot deny some do not deserve any attention, or... do you? :-)
--SA
Hans Dietrich 16-May-11 4:40am    
You are correct; one has to give attention where there is best opportunity to help and to teach. At the same time, I refuse to be be judgmental. My choice of which question to answer does *not* mean other questions do not deserve a serious, professional answer.
Sandeep Mewara 15-May-11 2:02am    
I agree to you here that it was badly formed question and not a 'bad' question. Thus, I did not down vote.

But, I will try to share few 'bad' questions with you in future and get your thoughts on the same.
The whole question really does not make sense.

I hope I will not increase amount of evil in the world if in return I'll add my answer which has little sense, but not exactly zero sense.

So,

  1. Get some C++ code, highlight and copy it to the clipboard.
  2. Open the following CodeProject page: http://www.codeproject.com/Questions/ask.aspx[^].
  3. Select radio button "encode HTML characters".
  4. Past C++ code in the big text area.
  5. Sandwich selected text in <pre lang="cpp">[you C++ text here]</pre>.
  6. If this is part of your question about C++, add all the details, issue report; comment your C++ source code with exception information and exact lines where exception was thrown or do same thing with compilation errors/warning.
  7. If this is not your question, copy obtained HTML code to clipboard and use somewhere — you "converted" C++ to HTML.


—SA
 
Share this answer
 
Comments
Hans Dietrich 14-May-11 18:36pm    
Evil. God will get you for this.
Sergey Alexandrovich Kryukov 15-May-11 12:13pm    
Ha ha ha.
Sandeep Mewara 15-May-11 2:03am    
:laugh:
Take my 5 for the humor.
Sergey Alexandrovich Kryukov 15-May-11 12:17pm    
Thank you, Sandeep.
(By the way, why? What if someone have trouble presenting code in HTML? Remember how many posts has broken formatting because of "<" in the middle of code? :-)
--SA
Sandeep Mewara 15-May-11 12:26pm    
Haha! Right... okay... 5 for 'no-humor' :-)
Your question does not make much sense. Overall, no, you cannot do a C++ code in HTML.
 
Share this answer
 
Comments
Richard MacCutchan 14-May-11 5:04am    
You are too kind, the question does not make any sense.
Sergey Alexandrovich Kryukov 14-May-11 15:20pm    
Agree with Richard. My 5.
--SA
Sergey Alexandrovich Kryukov 14-May-11 17:23pm    
I agree, but I just added my answer which at least has some little sense, hope you find it funny.
Please see.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900