921 Posted Topics

Member Avatar for adkool

[QUOTE]I experienced it somewhat faster than IE and Firefox cos it's written entirely on the assembly language.[/QUOTE]Assembly is only faster than other programming languages (such a C/C++), if the programmer has the ability to optimize the code better than the C/C++ compiler, and recent compilers do this very well, so …

Member Avatar for crunchie
2
897
Member Avatar for Mehwish Shaikh

The exact same would be: [CODE] if (tos==0) { // tos==0? return 1; // 1 } else { // : return 0; // 0 } [/CODE] But as you can see [CODE]return (tos==0?1:0)[/CODE] is much easier to write.

Member Avatar for peter_budo
0
315
Member Avatar for Carrots

You forgot the SND_FILENAME argument, change that line to:[CODE]PlaySound((LPCWSTR)"tone.wav", 0, SND_LOOP|SND_ASYNC|[B][COLOR="Red"]SND_FILENAME[/COLOR][/B]);[/CODE]and it should work.

Member Avatar for pseudorandom21
0
6K
Member Avatar for Phaelax

Don't kill me for this (I know this must be the worst idea ever), but WOOH! I figured it out! :D [CODE=CPLUSPLUS]#include <iostream> using namespace std; void addNodes(string names[]) { bool exception = false; size_t length = 0; string temp; do { try { temp = names[length]; ++length; } catch …

Member Avatar for Diego.Corso
0
27K
Member Avatar for The Buzzer

I think its about time you learn to use code tags, even though you have already been told to use them before and ignored what was said. Try again with code tags..

Member Avatar for raptr_dflo
1
137
Member Avatar for tux4life

A bit of an overkill don't you think? Also, your function can't handle negative numbers, mine can :D [CODE=C]string itos(int a) { if ( a == 0 ) return "0"; int sign = (a < 0 ? a = -a, 1 : 0); string result = sign ? "-" : …

Member Avatar for ztdep
0
1K
Member Avatar for Michael_Knight

"[B]Weren't we the revolution that every night almost happened... almost happened... kept almost happening; but instead we just only crashed into eachother?[/B]"

Member Avatar for happygeek
0
1K
Member Avatar for Fouly

Here is an example of how to use the [B]GetOpenFileName[/B] function. Any decent Win32 tutorial on the net would should you how to do this, so in future, search the web.[CODE=CPLUSPLUS]#include <windows.h> #include <string.h> #include <iostream> using namespace std; // Returns an empty string if dialog is canceled string openfilename(char …

Member Avatar for Quatrus
0
13K
Member Avatar for nomadewolf

Try this instead:[CODE=CPLUSPLUS]//empresas[i].nome_empresa = "a string"; strcpy( empresas[i].nome_empresa, "a string" );[/CODE]

Member Avatar for osirisgothra
0
149
Member Avatar for codecodile

Assuming this is the defaut Windows API listbox.. Step 1: Find a handle to the window containing the list box. [URL="http://msdn.microsoft.com/en-us/library/ms633499(VS.85).aspx"][link][/URL] Step 2: Allocate enough space to hold the strings. eg.[INDENT][CODE]int count = (int) SendMessage( listbox, LB_GETCOUNT, 0, 0 ); std::string *items = new string[count];[/CODE][/INDENT] Step 3: Retrieve those values. …

Member Avatar for rohan1020
3
393
Member Avatar for happygeek

- Music geek - Japanese language / culture geek - Texting geek - Computer geek

Member Avatar for Chatterbox721
0
758
Member Avatar for dalaharp

[QUOTE=marco93;811509]If its' on Windows, just use win32 api (1 line of code..)[/QUOTE] Go ahead then, tell us how to do it in one line.

Member Avatar for arielbernal
0
3K
Member Avatar for serkan sendur

Some of my favourites: - [URL="http://www.imdb.com/title/tt0111161/"]The Shawshank redemption[/URL] - [URL="http://www.imdb.com/title/tt0880578/"]Untraceable[/URL] - The new [URL="http://www.imdb.com/title/tt0796366/"]Star Trek[/URL]

Member Avatar for ronnieaka
0
1K
Member Avatar for rogue005

We help with specific C++ problems here, we aren't going to think up a project for you.

Member Avatar for alibabashaun
-1
682
Member Avatar for anurag143
Member Avatar for CoopOwnz
Member Avatar for lukename

If you're using windows, try:[CODE=C++]#include <windows.h> #include <iostream> using namespace std; int main() { char szFileName[MAX_PATH]; HINSTANCE hInstance = GetModuleHandle(NULL); GetModuleFileName(hInstance, szFileName, MAX_PATH); cout << szFileName; cin.ignore(); }[/CODE]

Member Avatar for William Hemsworth
0
165
Member Avatar for bigcat1969

Well, a nice place to start is always here: [URL="http://www.winprog.org/tutorial/"]http://www.winprog.org/tutorial/[/URL] However without the resource editor, you have a few different options, you could download a seperate resource editor, write your own resource file, or just avoid it entirely. First thing's first, you need the code for setting up a small …

Member Avatar for William Hemsworth
1
2K
Member Avatar for kamking

>Use the recovery disc. Thats asuming he made one before the password changed. I once had the same problem, this worked for me (took alot of searching). [URL="http://pcsupport.about.com/od/toolsofthetrade/gr/pcloginnow.htm"]http://pcsupport.about.com/od/toolsofthetrade/gr/pcloginnow.htm[/URL]

Member Avatar for amit7827
0
228
Member Avatar for Doomreaper

What's the big deal? If you just use a library, it's easy. [URL="http://johnwiggins.net/jwsmtp/"][link][/URL] This worked perfectly for me, and there's plenty more out there.

Member Avatar for Nick Evan
1
225
Member Avatar for VBNick

Another more common method would be to just loop from the start to end, instead of from the end to the start. [CODE]for (unsigned short i = 0; i < n_elements; ++i) { array[i] = blah; }[/CODE]

Member Avatar for William Hemsworth
0
173
Member Avatar for malvi

[B]GetDlgItemInt[/B] retrieves the value from the edit box and returns it as an integer, so long as you're using Win32 API this should work fine.

Member Avatar for Ancient Dragon
0
229
Member Avatar for gotnoname

Saving and loading maps coulden't be easier with C++ :) Say you have your map in a char array, this code would save that array to a bitmap.[CODE=CPLUSPLUS]#include <iostream> #include <fstream> int main() { char map[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, …

Member Avatar for !adam
0
148
Member Avatar for iceman29

Depends, if you mean using the Win32 API, then it's easily possible. AFAIK it's not possible to set the font size on the console through just using C++ code.

Member Avatar for xavier666
0
204
Member Avatar for babug

[QUOTE]Well I would hate to spoil the surprise but everything we see in the real world is basically digital. Made of atoms and energy. Then when measuring objects we use measurements that only measure a group of atoms the the number of atoms in that group always varies. It is …

Member Avatar for Sriman_Laxmi
0
1K
Member Avatar for William Hemsworth
Member Avatar for William Hemsworth
2
7K
Member Avatar for terence193

A nice collection of funny images, here are some I found funny :] [URL="http://newmedia.funnyjunk.com/pictures/0009.jpg"]http://newmedia.funnyjunk.com/pictures/0009.jpg[/URL] [URL="http://newmedia.funnyjunk.com/pictures/0015.jpg"]http://newmedia.funnyjunk.com/pictures/0015.jpg[/URL] [URL="http://newmedia.funnyjunk.com/pictures/0016.jpg"]http://newmedia.funnyjunk.com/pictures/0016.jpg[/URL] [URL="http://newmedia.funnyjunk.com/pictures/0022.jpg"]http://newmedia.funnyjunk.com/pictures/0022.jpg[/URL] [URL="http://newmedia.funnyjunk.com/pictures/0023.jpg"]http://newmedia.funnyjunk.com/pictures/0023.jpg[/URL] [URL="http://newmedia.funnyjunk.com/pictures/0036.jpg"]http://newmedia.funnyjunk.com/pictures/0036.jpg[/URL] [URL="http://newmedia.funnyjunk.com/pictures/0044.jpg"]http://newmedia.funnyjunk.com/pictures/0044.jpg[/URL] [URL="http://newmedia.funnyjunk.com/pictures/0047.jpg"]http://newmedia.funnyjunk.com/pictures/0047.jpg[/URL] [URL="http://newmedia.funnyjunk.com/pictures/0049.jpg"]http://newmedia.funnyjunk.com/pictures/0049.jpg[/URL] [URL="http://newmedia.funnyjunk.com/pictures/0055.jpg"]http://newmedia.funnyjunk.com/pictures/0055.jpg[/URL] [URL="http://newmedia.funnyjunk.com/pictures/0063.jpg"]http://newmedia.funnyjunk.com/pictures/0063.jpg[/URL] [URL="http://newmedia.funnyjunk.com/pictures/0068.jpg"]http://newmedia.funnyjunk.com/pictures/0068.jpg[/URL] [URL="http://newmedia.funnyjunk.com/pictures/0073.jpg"]http://newmedia.funnyjunk.com/pictures/0073.jpg[/URL] And thats enough for now :)

Member Avatar for vegaseat
0
885
Member Avatar for anny**

You should be more specific, what do you want your program to do? If it's to create a graph, your best bet would be to use a bitmap library. Here's a snippet I changed slightly so that you at least have a base to draw onto a bitmap. Actually drawing …

Member Avatar for selfrules
0
251
Member Avatar for ahihihi...

A1: A towel? A3: A mole? Two random guesses. [B]If you have me, you want to share me. If you share me, you haven't got me. What am I?[/B]

Member Avatar for reccakeys123
0
191
Member Avatar for george_82

Explain what you mean by "GIF image into binary". I'm assuming you mean to get an actual array of pixels instead of having them in a compressed format, but the question seems vague. Marco93, if you want to play it that way, your post has no sense. GIF is an …

Member Avatar for science.seeker
0
2K
Member Avatar for Dendei

[QUOTE]hey guys, emm can someone explain fast for me how to get to the programming state where u get a window with some options on the side and can then switch to code i cant remeber how to get there[/QUOTE]Huh? o.O if you want a good reply, ask a good …

Member Avatar for n.sehrawqat1987
0
94
Member Avatar for al3x748769
Member Avatar for freesoft_2000
Member Avatar for Tom Gunn
Member Avatar for manutd4life

This is a C++ snippet I made a long time ago, it's practically C and with some searching I'm sure you would have found it anyway. It's well commented so it should help you. [URL="http://www.daniweb.com/code/snippet217340.html"][link][/URL]

Member Avatar for manutd4life
0
166
Member Avatar for jephthah

I stopped most of my activity here a fair while before the big change, but now I have even less reason to come back, I totally agree with Jephthah, it's ugly and unwelcoming. The fonts are a mess, the colors are plain and dull, and everything seems to put strain …

Member Avatar for William Hemsworth
3
854
Member Avatar for alexbadboys
Member Avatar for eXceed69
Member Avatar for reach_yousuf
-1
5K
Member Avatar for sharensla

Yep, almost all spaces (except those between keywords) are ignorable, so in the end the compiler would just see it as [CODE]int*a[/CODE] anyway.

Member Avatar for Fbody
0
2K
Member Avatar for s_sridhar

- Being a young kid, life just seemed so simple. :P - Some nice holidays, I remember going to elba (a small island in italy) which was quite memorable. [URL="http://media-cdn.tripadvisor.com/media/photo-s/01/1e/d5/b5/isola-d-elba.jpg"][link][/URL] - Finishing my GCSE's and leaving school (about 1 week ago), it's such a relief and now I'm on holiday. …

Member Avatar for iamthwee
-1
254
Member Avatar for quicktpgo

[QUOTE]I envy those people who are the real legends in gaming world !![/QUOTE]I pity them, they're far from being "real legends" in the "real world" :icon_wink: Unless of course you're talking about the programmers.

Member Avatar for HiHe
0
123
Member Avatar for Rashakil Fol
Member Avatar for serkan sendur

[B]>if my best friends dont get featured i am going to organize them to leave for a better c# forum where their skills are appreciated.[/B] Oh please, do you actually care about helping people or do you just want everyone to see you as somebody who helps people, there's a …

Member Avatar for jephthah
1
366
Member Avatar for The Dude

>Aren't we supposed to just make 3 words from the word? Its more fun to make more :) Tired Direct Tied Rot Cot Cry Toe Record Dye Tide [B]Digital[/B]

Member Avatar for kaninelupus
-1
3K
Member Avatar for sravs25
Member Avatar for Chrisjj

I think it makes sense, when somebody says "Given an infraction", I interpret it as "Being given an infraction point" - a quantity of how much a user how violated the rules.

Member Avatar for diafol
0
783
Member Avatar for camelo

Hmm... 'be nice to my tall polish friend' 'beef never tastes minty to proper folks'?? my god, this is hard :D [B]tirenko[/B]

Member Avatar for maydhyam
-1
249
Member Avatar for The Dude
Member Avatar for reshmasalian

What's happening to the standards of posts these days? :icon_rolleyes: Learn how to present a question, and try again.

Member Avatar for sanji17
-4
195
Member Avatar for daveoffy

Post code so I see what you mean? When I have multiple window processes, I sometimes seperate them into different header files to stay organised.

Member Avatar for strmstn
0
134

The End.