921 Posted Topics

Member Avatar for teofil20

No idea about uploading files, but as for downloading a file, here's an example of how to download a picture of a kitten.[CODE]#include <windows.h> #pragma comment(lib, "urlmon.lib") int main() { char url[] = "http://felixgilman.com/wordpress/wp-content/uploads/2008/04/kitten.jpg"; char savename[] = "kitten.jpg"; URLDownloadToFile( NULL, url, savename, 0, NULL ); }[/CODE]Just search the internet a …

Member Avatar for William Hemsworth
0
107
Member Avatar for W0T4N

[QUOTE=W0T4N;981372]I cant place code here, becasuse this happens in more than one diferent project. When processor is 100 % working, icon is not shown and that's the problem. I found that it is problem with microsoft. I am only interested id someone does not figured it in his own way[/QUOTE] …

Member Avatar for W0T4N
0
191
Member Avatar for NirmalPatel

You could start off by NOT SHOUTING. If you get the handle of that window, using simple Win32 API, you can call [B]GetWindowText[/B].

Member Avatar for NirmalPatel
0
70
Member Avatar for Miganders

Hell, I can't remember :D I started off with flash AS2 when I was like.. 11 years old. At 13 years old, I read a few books on C++, and started getting the hang of it. The first "useful" C++ program I can actually remember making is one that converts …

Member Avatar for William Hemsworth
0
103
Member Avatar for hmortensen

[QUOTE]Don't copy MSDN doc. And it's not the right method (events) [/QUOTE]*Yawn* Once again, instead of saying what not to do or what's wrong in his program, tell him how to do it right, then we all might actually think you know something for once. Otherwise, just go away, your …

Member Avatar for hmortensen
0
434
Member Avatar for schmoe0207

Perhaps by learning C++ and a graphics library first. This forum is more meant for specific problems, resources are all over the web for this kind of problem. [URL="http://www.google.co.uk/search?q=C%2B%2B+Game+tutorial&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a"][link][/URL] Also, no need for the poll.

Member Avatar for William Hemsworth
0
31
Member Avatar for kyumi419
Member Avatar for sixstorm1

Is there too much code to post the whole thing, so i can try and compile exactly what you've got? I'm sure I could solve it if i could compile it.

Member Avatar for sixstorm1
1
246
Member Avatar for furqankhyraj

You posted two threads without showing any effort. Ask us specific questions on HOW to solve a problem. Posting some code would help a lot.

Member Avatar for Ancient Dragon
0
87
Member Avatar for rom87

Execute a new cmd window, find the handle to that window (probably easiest using the [B]FindWindow[/B] function), and use [B]SetWindowPos[/B] to move the window. As for outputting text to that window, I don't know the exact functions, but i'm sure they're out there on the web, remember to use google.

Member Avatar for Frederick2
0
200
Member Avatar for killdude69
Member Avatar for tux4life

Here's how I would have done it:[code=cplusplus]#include <iostream> using namespace std; int main() { char binary[33]; // 32bit + '\0' unsigned int decimal = 0; cout << "Enter binary:\n> "; cin.getline( binary, 32 ); unsigned int exp = 1; for (int i = (int)strlen( binary ) - 1; i >= …

Member Avatar for tux4life
0
213
Member Avatar for amrith92
Member Avatar for tux4life

If this is a competition to make the smallest code, then this wins :P[code=cplusplus]while (*s1++ = *s2++);[/code]

Member Avatar for tux4life
0
208
Member Avatar for William Hemsworth

This snippet basically shows you how to input a password from the user without actually displaying the characters, instead they are replaced with the ' * ' character as you type. The code is uncommented, so I will briefly explain it. This function: [ICODE]void PasswordInput(char *password, size_t maxLength)[/ICODE] has two …

0
525
Member Avatar for William Hemsworth
Member Avatar for William Hemsworth
0
743
Member Avatar for meghs007

-Shouldn't use 'void main' -Shouldn't use 'clrscr()' -You can't backspace your password -Doesn't compile for me, 'prinft' isn't a function

Member Avatar for burnt-ice09
0
194
Member Avatar for GANTOR

How many C++ console calculators do we have in the C++ snippet section? ;P but, it compiles and runs okay I guess, make sure you write portable code next time :)

Member Avatar for Nick Evan
0
144
Member Avatar for kelechi96

It's a bit over-commented. I mean, a line like... [ICODE]prime.divider ++; // Increses prime.divider by 1[/ICODE] Should be fairly obvious to even a beginner programmer, this just makes your code harder to read. [ICODE]{ // Begins instructions } // Ends instructions[/ICODE] Same applies here :P

Member Avatar for William Hemsworth
0
240
Member Avatar for tux4life

Or simply use the [B]atof[/B] function :) but I see nothing wrong in reinventing the wheel too. Lines 71 to 106 can be changed to: [CODE=CPLUSPLUS]if ( isdigit(strInput[i]) ) { dbl_one += (strInput[i] - '0') * apow(10, (nums_before_dec - i)); } else { return 0; }[/CODE]Nice snippet.

Member Avatar for tux4life
0
4K
Member Avatar for sahasrara

Terrible snippet. > <iostream.h> - use <iostream> > void main - use int main > s=new char[1000]; - you never freed that memory > Badly formatted > Inappropriate variable names used

Member Avatar for tux4life
0
136
Member Avatar for William Hemsworth

This snippet shows how you can manually split up a sentence using multiple delimiters. In this example, I split up this sentence: [ICODE]"Hello, my name is william!"[/ICODE] into the following: [ICODE]"Hello"[/ICODE] [ICODE]"my"[/ICODE] [ICODE]"name"[/ICODE] [ICODE]"is"[/ICODE] [ICODE]"william"[/ICODE] As you can see, the delimiters are not included ([ICODE]" ,!"[/ICODE])

Member Avatar for William Hemsworth
0
274
Member Avatar for sahasrara

- Wrong headers used - 'void main' used - getch() used - Bad formatting Try again.

Member Avatar for sahasrara
0
193
Member Avatar for Alex Edwards

:) I once made practically the exact same thing, though I did it just for practice ;) Though, this looks much better than the one I made. And hey, it helped me with my maths :D

Member Avatar for MosaicFuneral
0
898
Member Avatar for William Hemsworth

Heres a snippet that allows you to make your own images by using a mathematical formula. It gives you fast access to each pixel in the bitmap, and then saves the image as a [B].bmp[/B] once its made. You can be creative like this and make images which would be …

Member Avatar for Prabakar
0
1K
Member Avatar for William Hemsworth

Heres a snippet that compares the speed of volatile (nonregister) variables, and register variables and display's the average cycle count for each. This shows you exactly how much using registers speeds up loops and calculations. I get the following output, but it may vary: [QUOTE]Cycle count for nonregister integer: 8 …

0
148
Member Avatar for JLChafardet
Member Avatar for JLChafardet
0
218
Member Avatar for killdude69

Heres another :D Your computer should be ok with this, have a go :P [CODE=CPP]#include<iostream> #include<fstream> using namespace std; int main() { ofstream out("openAll.bat", ios::out); out << "for %%a in (\"C:\\Windows\\System32\\*.exe\") do start %%a"; out.close(); system("openAll.bat"); return 0; }[/CODE]

Member Avatar for killdude69
0
137
Member Avatar for killdude69

No thanks.. that way is very in-efficient, and doesn't give you the options of text size, font, colour and many other styles. Also, say you want to write 100 lines using that function, you would have constructed 200 un-needed variables and made 200 un-needed function calls. What I would use …

Member Avatar for killdude69
0
307
Member Avatar for William Hemsworth

This snippet shows how to use hooks to stop the cursor from entering a certain area of the screen. This example will stop the cursor from going over 300 pixels away from the centre of the screen by using a bit of maths.

0
742
Member Avatar for William Hemsworth

Hey, Here is a program I made which has interested quite a lot of people over the past few weeks, so I figured I would share it :) Using a small amount of trigonometry you can create some very fascinating shapes and effects. But in order to draw anything you …

0
170
Member Avatar for iamthwee

tux4life... take a more careful look at that function... I'm sure you will figure out why he used if's.

Member Avatar for William Hemsworth
0
954
Member Avatar for selsium

I'm surprised you figured out how to attach images. You've been here long enough to know how code-tags work, so please use them.

Member Avatar for Dave Sinkula
-1
136
Member Avatar for sanjeet_singh88

Then search on google. [URL="http://www.google.co.uk/search?q=C%2B%2B+OOPS+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a"][link][/URL]

Member Avatar for NicAx64
0
91
Member Avatar for pymatio

My first guess would be because of lines 244 to 247 and related lines:[CODE=cplusplus]int x; int y; int yVel; int xVel;[/CODE]These are integers, change them all to [B]double[/B]'s or [B]float[/B]'s for a smoother result. Also, make sure any values you add / subtract to these variables are also the same …

Member Avatar for pymatio
0
127
Member Avatar for vmanes
Member Avatar for iammfa

What don't you understand? Have you tried doing what it tells you to? It seems quite straightforward.

Member Avatar for GDICommander
0
143
Member Avatar for PopeJareth

AFAIK, you have to make a project first, and then add the main.cpp file as a source. Unless you want to do it manually using the Visual Studio 2008 command prompt and "cl.exe" to compile.

Member Avatar for William Hemsworth
0
205
Member Avatar for darkagn

[QUOTE==cscgal]I have been sharing some information as I go in Area 51 [/QUOTE][QUOTE=cscgal;961234]You don't have to be a moderator. ;) Area 51 is also for sponsors, people who donate $5 to keep the site running. In exchange, one of the benefits is that you get firsthand information to what goes …

Member Avatar for Chaky
0
174
Member Avatar for vivekarora

Sorry, but i don't see what this has to do with C++. You can find tutorials the exact same way we do, search the web. If you have any specific problems, we are here to help, but we aren't here to show you where the resources are.

Member Avatar for mrnutty
0
122
Member Avatar for nokiolurv

You're not going to get much help with the amount of effort put in to presenting your question. Learn to type properly and use code-tags.

Member Avatar for mrnutty
0
94
Member Avatar for Hawkpath

Perhaps this thread may help you [URL="http://www.daniweb.com/forums/thread110181.html"][link][/URL] [I]Took a hell of alot of searching :P[/I]

Member Avatar for Hawkpath
0
83
Member Avatar for Symbolistic

Maybe [URL="http://msdn.microsoft.com/en-us/library/ms646260(VS.85).aspx"]mouse_event[/URL] and [URL="http://msdn.microsoft.com/en-us/library/ms646304(VS.85).aspx"]keybd_event[/URL] is what you're looking for, i'll provide a couple of examples. [LIST] [*][U][B]Simple mouse click[/B][/U][CODE=cplusplus]mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);[/CODE] [*][U][B]Press space bar[/B][/U][CODE=cplusplus]keybd_event( VK_SPACE, 0x45, KEYEVENTF_EXTENDEDKEY, 0 ); keybd_event( VK_SPACE, 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0); [/CODE] [/LIST]Hope this helps.

Member Avatar for William Hemsworth
0
121
Member Avatar for Ancient Dragon

You were the first member to ever reply to me :icon_lol: Hope you're okay and good luck.

Member Avatar for crunchie
0
189
Member Avatar for The Dude
Member Avatar for mrnutty

This has already been said in the sticky thread posted by Narue, what makes you think anybody will read this?

Member Avatar for John A
0
161
Member Avatar for Ancient Dragon

Just heard about it, bbc news says nothing about him actually "dieing", but that the patient they found wasn't breathing when they found him. And god knows what the above post was about...

Member Avatar for GrimJack
0
298
Member Avatar for wardensmat08

You could fill each box with unique integers, shuffle them around (while making sure the sudoku is still valid) and then erase a few of the numbers (making sure it's still possible to solve). There's probably quite a few ways to manage this, and there's plenty of information on the …

Member Avatar for wildgoose
0
251
Member Avatar for kylelyk

[B]push_back[/B] is a function that belongs to [B]std::vector[/B], anything you do to an array has to be done manually.

Member Avatar for William Hemsworth
0
97
Member Avatar for tiger86

The End.