921 Posted Topics

Member Avatar for A1 data nz

[QUOTE]Not only that but I will show you mathmatical properties of some parts of the english translated (aramaic) new testament that are so precise that they are outside of the ability of a normal human with a computer to concieve.[/QUOTE]I'm looking forward to that day...

Member Avatar for GrimJack
1
151
Member Avatar for clisen

That's because you can not set the size of an array at runtime. If you want do this, research dynamic allocations using the [b]new[/b] keyword.

Member Avatar for clisen
0
185
Member Avatar for john_beginner

C++ is case sensitive, so [b]class c : public A,b[/b] should be [b]class C : public A, B[/b]

Member Avatar for indianapple89
0
109
Member Avatar for mathueie

Pretty much all of your threads have had something to do with finding the CPU usage in different operating systems. I think you should find some multi-platform library to do this for you instead of figuring each one out yourself.

Member Avatar for William Hemsworth
0
59
Member Avatar for yazooney

It's a dangerous thing to do, but:[code=cplusplus]double *a = (double*)0x245CEA20; std::cout << (*a);[/code]

Member Avatar for yazooney
0
3K
Member Avatar for Rs trainer

Not another one.. [URL="http://www.daniweb.com/forums/thread139990.html"]http://www.daniweb.com/forums/thread139990.html[/URL]

Member Avatar for lilo310
-3
89
Member Avatar for ithelp

My most blurred key is the Caps-Lock, probably caused by a thick layer of dust that's built up over the years :P My most used key (and cleanest) is probably the space bar, seems logical as you use it at the end of almost every word.

Member Avatar for vegaseat
0
164
Member Avatar for mathueie
Member Avatar for tdapple

Do what you like the most, though if it were me I would start off with something lower level like C/C++ as it will give you a better understanding of computers in general. If you then want to move into a faster method of programming, learn something such as C# …

Member Avatar for William Hemsworth
0
55
Member Avatar for osmano807

Too slow? I just made a program which loads 60000 words, and it managed that in about a 1/10th of a second. Use simple file streams ([URL="http://www.cplusplus.com/doc/tutorial/files/"]std::ifstream[/URL]) and [URL="http://www.cplusplus.com/reference/stl/vector/"]vectors[/URL], and speed shouldn't be a problem.

Member Avatar for ArkM
0
121
Member Avatar for Ancient Dragon

I heard on TV that she's "the most viewed person on the whole of the internet" She is very talanted, but I personally prefer [URL="http://www.youtube.com/watch?v=QWNoiVrJDsE"]Connie Talbot[/URL].

Member Avatar for ahihihi...
0
92
Member Avatar for imcashsaver

[B]>A Lot people says that Windows XP is much better than VISTA? why?[/B] No, it's not true. Many peoples opinion is that XP is better and more reliable than Vista, but I disagree. [B]>the files you created in Windows XP could not be opened if you use VISTA Operating System? …

Member Avatar for hornit
0
292
Member Avatar for rajboy

[B]>No, YOU write it![/B] Don't get carried away. I think he was just quoting his question, after all, he did say "Im not here for the codes but rather someone could spur me up so that i can kickstart." [B]>thrown 3 qns[/B] I guess that means questions, use good English …

Member Avatar for ithelp
0
100
Member Avatar for Nick Evan
Member Avatar for csurfer
4
352
Member Avatar for Xephys

So, are you trying to make the puk bounce when it hits the top or the bottom? If so, simply invert the Y-Velocity like this:[code=cplusplus]if ( box.y < 0 ) { yVel *= -1; box.y = 0; } else if ( box.y > curLvlHeight - PUK_HEIGHT ) { yVel *= …

Member Avatar for Xephys
1
229
Member Avatar for spadez

I'm not sure if this is possible with Vista, there's probably already software available on the internet to do this, but if you planned on doing it manually, you need these 3 main things:[LIST] [*]To be able to disable all system hotkeys, so the internet explorer can't be closed. [*]Make …

Member Avatar for William Hemsworth
0
109
Member Avatar for seemant_sun

[QUOTE]It is always better to put the statements in if conditions in brackets. And start using else if's.[/QUOTE]Who says using brackets is better? IMO your code was harder to read than the original code. If it were me, I would have written it like this:[CODE=C]#include <stdio.h> int main() { int …

Member Avatar for William Hemsworth
0
382
Member Avatar for blahblah619

[CODE]#include <iomanip> #include <iostream> using namespace std; #ifdef __GNUC__ #include <unistd.h> #endif #ifdef _WIN32 #include <cstdlib> #endif int main() { for (int units = 10; units > 0; units--) { cout << units; if (units < 1) cout << "\rBlast off!\n"; cout.flush(); #ifdef __GNUC__ sleep(1); // one second #endif #ifdef …

Member Avatar for siddhant3s
0
234
Member Avatar for jdm

[QUOTE=killdude69;879552]You shouldn't use a textfile, the user could just simply delete the text file or something. You could create the file in a hidden folder somewhere on the D: drive so the user could not find it, keeping your source code secure.[/QUOTE] Nah, a text file is fine, so long …

Member Avatar for jdm
0
226
Member Avatar for Unhackmee

[QUOTE=Narue;881164]>>...but #include "stdafx.h" is missing >Please note that it's not needed for non-Microsoft compilers It's not needed for Microsoft compilers either. :icon_rolleyes: I hate how they use that as a default include for generated code. That's one of the reasons I always create an empty project with Visual Studio instead …

Member Avatar for William Hemsworth
0
97
Member Avatar for frowlaya

This code is unintelligible. I can't quite tell with the current formatting, but is that supposed to be an 8 - levelled for loop? Rewrite your code, using [ICODE]int main( void )[/ICODE] instead of [ICODE]void main()[/ICODE], and make sure it has a decent structure. Initialize your sudoku like this:[CODE=CPLUSPLUS]int sudoku[9][9] …

Member Avatar for frowlaya
0
142
Member Avatar for abhishek2301

If you want to compare the probability of whatever it is, you shouldn't use the [B]==[/B] operator, instead do... [code=cplusplus]if ( fabs(prob) - 0.5 < 0.001 ) { counter++; }[/code]You can change 0.001 to a precision of your choice.

Member Avatar for ArkM
0
140
Member Avatar for Black Magician

I would do this in C++. This is no easy task, you are talking about simlulating keystrokes to the window and making the program 'play the game' for you. In C++ you could either use [B]SendMessage[/B] or [B]keybd_event[/B] to simulate the keystrokes to the window. Getting the hardcoded data from …

Member Avatar for William Hemsworth
0
135
Member Avatar for mirfan00

Is this you three years back? [URL="http://www.daniweb.com/forums/thread49252.html"][link][/URL] If so, maybe you could have googled your question, found that thread and rediscovered almost the exact same answer that's been given here. We aren't here to write code for you, only to help you get started.

Member Avatar for mirfan00
0
202
Member Avatar for MrNoob

Is there any code you aren't posting? what is [B]FIND_NUM[/B] and [B]BIGGEST[/B]? You can't use [B]sizeof[/B] to work out the length of an array passed to a pointer, instead you have to allow the caller to pass the length of the array as a parameter.

Member Avatar for jephthah
0
138
Member Avatar for Massena

1.22461e-16 is equal to 0.000000000000000122461, which is pretty close to 0 if you ask me. This is just caused by the precision of the [B]double[/B] type and how the data is stored. You could also round the number to remove that problem.

Member Avatar for ArkM
0
121
Member Avatar for tonief

An example...[code=cplusplus]// In Form1 code { Form2->mylabel->text = "Hello"; }[/code]

Member Avatar for tonief
0
88
Member Avatar for singhraghav

Use code tags. You have given us nothing to go on here, does the compiler throw errors at you? Is the output wrong or not what you expected? Remember, a decent question gives a decent answer.

Member Avatar for mirfan00
-1
118
Member Avatar for brbsmn00

Use a library to do that part for you, something like [URL="http://www.codeproject.com/KB/cpp/lint.aspx"]lint[/URL] for example.

Member Avatar for jephthah
0
73
Member Avatar for realmasa77

Read the comments on this snippet. [URL="http://www.daniweb.com/code/snippet1211.html"][link][/URL]

Member Avatar for realmasa77
0
210
Member Avatar for rukunaditya

main() is the start of any C++ application, why do you need to do it without it ?

Member Avatar for Narue
0
171
Member Avatar for selaog

Open a file stream, and write the array to it. [URL="http://www.cplusplus.com/doc/tutorial/files/"][link][/URL]

Member Avatar for jloundy
0
81
Member Avatar for FaMu

[code=cplusplus]while(!inFile.eof())[/code]Don't use eof() inside a loop like that, simply do what ArkM suggested and do this:[code=cplusplus]while ( inFile >> ascii ) { cout << (char)ascii; }[/code]Hope this helps.

Member Avatar for FaMu
0
167
Member Avatar for wnrqkflwnrqkfl

[QUOTE=iamthwee;877372]> Remember that it's still a part of C++ I'll agree with you on this, but where you can it makes sense to use c++ functions.[/QUOTE] Use what's easiest, while keeping an eye on performance and code consistency if possible. If a C solution is easier to program/understand than a …

Member Avatar for Dave Sinkula
0
3K
Member Avatar for pxndx

[QUOTE]Or read the following (IMO the best) free e-book about C++ programming: [url]http://msdn.microsoft.com/en-us/beginner/cc305129.aspx[/url] :)[/QUOTE]How unfair! I bought that book once, I never knew it was on msdn. :P

Member Avatar for ArkM
0
147
Member Avatar for rtwister

If you are using the Windows API, you can do this in a few ways.[LIST] [*]Focus on the text box, and simulate keypresses. [*]Get the text box window handle, and set the text using [URL="http://msdn.microsoft.com/en-us/library/ms633546(VS.85).aspx"]SetWindowText[/URL] [*]... Probably more methods [/LIST]Hope this helps.

Member Avatar for William Hemsworth
0
563
Member Avatar for venucpp

>before that i need to send only few data There's a chance that this may have been his problem, not sure though. :P

Member Avatar for William Hemsworth
0
96
Member Avatar for zack.walters
Member Avatar for vlakarados

There's a few small errors in your code, but overall you seem to have the right idea. Here is the corrected code:[CODE=CPLUSPLUS]#include <cstdlib> #include <iostream> #include <string.h> using namespace std; int main(int argc, char *argv[]) { string s1; int x = 0; s1 = "1020401"; int length = (int)s1.length(); for …

Member Avatar for vlakarados
1
1K
Member Avatar for jephthah

Haha :D the age ratings generally dont make much difference, it mostly depends on the kid. I remember watching some sort of violent film (rated 15+), and there was a 7-8 year old kid sitting and laughing at it. Whereas my 8 year old sister had to leave Narnia (PG) …

Member Avatar for vmanes
0
207
Member Avatar for sdas7

[QUOTE]never mind copying and pasting links for me.....all i wanna know is the answer for wat combination of calls can be used for reading binary file and sendin thro a socket.......i can try to put it in my code if i get some basic help......[/QUOTE]Your ungratefulness to people who are …

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

[QUOTE]Then a zero value is returned, or am I wrong? [/QUOTE]You're wrong. If you pass a NULL pointer to [B]atoi[/B], your program will most lightly crash. If you pass a string such as "12Q34" then it will return [B]12[/B], as it stops as soon as it reaches the first non-digit …

Member Avatar for sanushks
0
160
Member Avatar for arshad115

Careful where you are placing that code, the easiest option would be to find where it says:[CODE=CPLUSPLUS]/// Required designer variable.[/CODE] [I](line 49 for me on my default generated window)[/I] Then put any variables after that. Also, it's not usually a problem to declare it as a static variable, which should …

Member Avatar for William Hemsworth
0
124
Member Avatar for arshad115

Try using this code instead:[CODE=CPLUSPLUS]PictureBox ^pBox = gcnew PictureBox(); pBox->Parent = this; // 'this' is pointing to our form (the parent) pBox->Location = Point( 240, 210 ); pBox->Size::set( Drawing::Size(30, 30) ); pBox->BackColor::set( Color::Aquamarine );[/CODE]And as for making an array of [B]PictureBox[/B]s, this code will make an array that can hold …

Member Avatar for arshad115
0
795
Member Avatar for cool_zephyr

Here's a small snippet to turn on the Caps-Lock.[CODE=CPLUSPLUS]#include <windows.h> int main() { if ( !GetKeyState(VK_CAPITAL) & 1 ) { // If caps lock is off, simulate keypress keybd_event( VK_CAPITAL, 0, KEYEVENTF_EXTENDEDKEY, 0 ); keybd_event( VK_CAPITAL, 0, KEYEVENTF_KEYUP, 0 ); } return 0; }[/CODE]Hope this helps.

Member Avatar for Salem
0
333
Member Avatar for serkan sendur

I'm learning Japanese at a slow pace, mostly self-taught. Now than I'm leaving to go to college, I can't have my one japanese lesson per week at high school anymore. I'll probably get private lessons or keep myself motivated and continue learning by myself. I speak a fair amount of …

Member Avatar for verruckt24
1
256
Member Avatar for rizillion

[QUOTE=tux4life;870198]I think you aren't much with an enumeration like this, if your enumeration (the data type) hasn't got a name, then you should declare a 'variable' directly after it's definition (you don't have to do this, syntactically your example is correct, but if you don't do this it's pretty much …

Member Avatar for tux4life
0
203
Member Avatar for hawash

I changed the function prototype on line 32 of [B]_Double_Task.h[/B], and the actual function on line 224 of [B]_Double_Task.cpp[/B] to allow it to compile. Im not sure if this is what you wanted, but stuff happens and it compiles :P [B] [attach]10148[/attach] [attach]10149[/attach][/B] Hope this helps.

Member Avatar for hawash
0
108
Member Avatar for Slephnir

Don't bother colouring your post green, it doesn't attract any wanted attention. For you this would be nearly an impossible task without the use of a third party library, so my advice is to do some good research on a library that can handle these video types.

Member Avatar for William Hemsworth
0
87
Member Avatar for ShadowScripter

@ShadowScripter If you're new to this, using DirectDraw may seem quite complex, perhaps start on something easier?

Member Avatar for William Hemsworth
0
930

The End.