Posts
 
Reputation
Joined
Last Seen
Ranked #1
Strength to Increase Rep
+17
Strength to Decrease Rep
-4
91% Quality Score
Upvotes Received
2K
Posts with Upvotes
2K
Upvoting Members
627
Downvotes Received
169
Posts with Downvotes
145
Downvoting Members
113
838 Commented Posts
~3.40M People Reached
Favorite Tags
c++ x 6K
c x 3K
java x 185
c# x 69

6,741 Posted Topics

Member Avatar for humbug

You don't set RAND_MAX, it's a constant value (usually 32767). I don't see why you would want to set it unless the range is too small for you (in which case you use a better random number generator). Tell us how you're trying to go about solving the problem, show …

Member Avatar for yw_046
2
31K
Member Avatar for ams

Create an array of questions and use the random number as an index for the array.

Member Avatar for DINO_4
0
2K
Member Avatar for kacete

>why? Because when you use void main, your code is no longer guaranteed to compile or run. The C standard specifies two definitions of main, and you should use one of those unless you have a [I]very[/I] good reason not to: [code=c] /* When expecting no command line arguments */ …

Member Avatar for theekshani
2
17K
Member Avatar for NinjaLink

>Its only drawback is that, while it mentions bogosort, it doesn't give an implementation. For two reasons. First, there's little point in providing an implementation of a sort that would never be used in practice. My site is about practical programming. Second, bogosort is a pain to verify for correctness. …

Member Avatar for Nor_492
0
7K
Member Avatar for AmerJamil

[QUOTE]can you please tell me short and best answer so that i can understand it more clearly...[/QUOTE] Compilers are not required to support anything but the following two definitions of main (equivalent definitions are allowed though): [code] int main() { ... } [/code] [code] int main(int argc, char *argv[]) { …

Member Avatar for EricStens
0
2K
Member Avatar for comwizz

>wat is echo?? In this case, echo means that when you type a character, it prints to the screen so you can see what you typed.

Member Avatar for Smartfitness33
1
5K
Member Avatar for jack jastin

Ethical hacking is the practice of penetrating security (usually with the owner's consent) for the purpose of improving it rather than taking advantage of weaknesses for personal gain or malicious reasons.

Member Avatar for Raunikkapoor
-4
168
Member Avatar for xxunknown321
Member Avatar for jimmichaels29
0
1K
Member Avatar for samaru

[quote] Bleach Naruto FMA Samurai Champloo Samurai 7 [highlight]Onegai Teacher Onegai Twins[/highlight] Hellsing Samurai X [/quote] That's a pretty sudden switch. Aren't both Onegai Teacher and Onegai Twins romantic comedies?

Member Avatar for thompsonmax
1
3K
Member Avatar for millanskie

>Is this possible in vb.net Of course. It's not like you're doing anything exceptionally complicated, but it [I]will[/I] be tedious. Kanji is symbolic and based on concepts/words while katakana is based on syllables. There's really not an algorithm for breaking kanji down into katakana, so you have to take all …

Member Avatar for Valeria_3
0
2K
Member Avatar for djbsabkcb

>Below is my source code but I am getting errors stating invalid conversions. Post the errors.

Member Avatar for jacklin
0
2K
Member Avatar for mikeandike22

>But the more I seek for that the more I understand >how super impossible that is in this sad world... Then learn "great machine code programming" and be your own friend. Because with that attitude, your standards are too high for real friends.

Member Avatar for VEGETA_DTX
1
2K
Member Avatar for samaru

>What's the HARDEST program you've written? Operating system. Well, technically I didn't write it, but I did patch it into behaving and that consisted of replacing about 90% of the code.

Member Avatar for Fest3er
0
3K
Member Avatar for pseudorandom21

That seems kind of silly to me. The point of a checksum is to verify the legitimacy of a file after downloading it. If you're getting the checksum before downloading the file it's no different from taking on faith that the file is legit in the first place.

Member Avatar for Reinhard_1
0
7K
Member Avatar for munitjsr2

Alternatively, use isprint to determine if there's a printable representation of the character, and show the numeric value if there is not.

Member Avatar for AssertNull
0
3K
Member Avatar for ConstantineOfTX

[QUOTE]I regard hielo's non-responsive response as an attempt to bully a newbie.[/QUOTE] I'm sorry you feel that way, but nothing in hielo's post constitutes bullying. Your use of code tags made the code more difficult to follow (for which he suggested a fix), and frowny faces embedded in the code …

Member Avatar for Richard_42
0
392
Member Avatar for Incubator

[QUOTE]all i could find, peaople saying: it depends on the os, compiler, etc[/QUOTE] When you rely on compiler-specific features, that's the correct answer. For textcolor(), the portable replacement (for Windows platforms) is [URL="http://msdn.microsoft.com/en-us/library/ms686047(v=vs.85).aspx"]SetConsoleTextAttribute()[/URL]. For delay() and sleep() the portable replacement (also for Windows) is [URL="http://msdn.microsoft.com/en-us/library/ms686298(VS.85).aspx"]Sleep()[/URL]. [QUOTE]Please write a proper answer, …

Member Avatar for Emre_4
0
2K
Member Avatar for veiLrn

I see several problems, but the most likely one you're encountering is this: [code] int bank::accno=0; [/code] accno doesn't exist in the class. The only static data member is called accnumber, so I can only assume the mixup is a brain fart. Make sure all identifiers match up and it …

Member Avatar for ASIF_21
0
32K
Member Avatar for Anil2447

[QUOTE]What is meant by STEP-COUNT METHOD?[/QUOTE] You define what a "step" means for the algorithm (usually statements), then the total of those steps using variables such as N can be calculated. [QUOTE]What is the procedure in that to calculate?[/QUOTE] [list] [*]First define steps: [code=c] int mean(int a[], size_t n) { …

Member Avatar for arina_1
1
15K
Member Avatar for rugae

>I'm not quite sure the difference between strcmp and == operator when comparing 2 different strings Presumably you're using C-style strings, otherwise strcmp wouldn't be an option. So with that in mind, you should use strcmp because it compares the contents of the strings while == compares the address of …

Member Avatar for Nikolay_2
0
4K
Member Avatar for rsu

You write your code in the text editor of your choice, then pass the text file to NASM for assembly.

Member Avatar for yahya_3
0
6K
Member Avatar for Good Bye

I'm impressed. You actually made it 5 posts before turning into a total d'bag. Most of your kind don't make it two posts, so I'd say you have some potential in being a normal, well adjusted member of society. With some effort, of course.

Member Avatar for Nihat_1
0
3K
Member Avatar for AmerJamil

[QUOTE]Simple example adding two numbers is[/QUOTE] Clearly you don't understand what the OP is asking. The problem is to add two numbers that cannot be stored in any integer type. It's an exercise in [URL="http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic"]arbitrary precision arithmetic[/URL].

Member Avatar for JamesCherrill
0
1K
Member Avatar for rupali

>How to calculate time complexity of any algorithm or program .... The most common metric for calculating time complexity is Big O notation. This removes all constant factors so that the running time can be estimated in relation to N as N approaches infinity. In general you can think of …

Member Avatar for jamie_13
2
50K
Member Avatar for rwkopcke

>You are relying upon that program (pause.exe) being available You're also relying on that program doing what you expect it to do. The problem is that one can easily replace pause.exe with another program of the same name but a malicious payload. [ICODE]system("pause");[/ICODE] isn't portable, but the real kicker is …

Member Avatar for Mohit_12
0
7K
Member Avatar for dyingatmidnight

What's the range of int? I bet not enough to handle that value, so on your system it wraps around and you find yourself with a negative value.

Member Avatar for Jimmy_7
0
213
Member Avatar for heroares

[QUOTE=heroares;1699778]how can i write .[/QUOTE] The problem you've described is adequate as either the first or second program after hello world for absolute beginners, so if you don't know where to start, I'd say start by learning a little C++.

Member Avatar for Destaw_1
0
291
Member Avatar for elektro123

[B]>I can't find good source of knowledge about this algorithm.[/B] Unless by "good" you mean "full source code that I can understand at my newbie level and instructions on exactly how it works so that I can paste it into my homework and get away with it", I'd say you …

Member Avatar for Zlatan25
0
3K
Member Avatar for kylcrow

[QUOTE]So in the long run it will probably be better to read it into a vector[/QUOTE] When I give this as an interview problem, there's a caveat that the file may be very large. Whether I mention it after being asked about file sizes or by rejecting solutions similar to …

Member Avatar for zia shaikh
0
5K
Member Avatar for Alex Edwards
Member Avatar for ibthevivin

Have you written a change making program? It's the same concept for converting to roman numerals: spit out the largest possible denomination until there's nothing left in the remaining total. Start with that so you're no overwhelmed.

Member Avatar for ddanbe
0
3K
Member Avatar for pavankumar77

>Not a good way I can't really imagine a "good" way to answer this make-work question. Every possible solution is ridiculous and impractical compared to just using the addition operator. :icon_rolleyes:

Member Avatar for pritaeas
0
642
Member Avatar for .It.

[B]>How to avoid this?[/B] Let's start by asking why you want to do it. I can think of a few reasons to obfuscate the executable, and for the most part those reasons are either paranoid and ineffective, or easily avoided with proper design.

Member Avatar for overwraith
0
5K
Member Avatar for norEdz

Break it down into manageable parts. I'd say start by reading the file character by character and simply writing those characters to cout.

Member Avatar for David W
0
11K
Member Avatar for keval_hack

Stupid questions teaching useless trivia with horrible code examples. I'd appreciate if you didn't propagate the rampant stereotypes of Indian programmers while at the same time leading everyone else astray. :icon_rolleyes:

Member Avatar for Ahamed_1
-1
2K
Member Avatar for akshaydixi

[QUOTE]im not looking for those boring library management,hotel management and stuff but something interseting which will force me to think.[/QUOTE] I think you'll find much of the "boring" stuff will indeed force you to think if you do it properly. Any idiot can write an amateurish project without thinking. Writing …

Member Avatar for Darackht
-2
3K
Member Avatar for canadafred

The interface is better than Facebook (not a difficult feat), but my prediction is that Google+ will fail miserably since Facebook has already hit critical mass and will be extremely hard to compete with.

Member Avatar for Honeyclerkk
0
226
Member Avatar for DigitalPackrat

>Is there a workaround? Switch to Code::Blocks. The underlying compiler is the same (gcc with MinGW), and the IDE is vastly superior in my opinion. Also, Dev-C++ is no longer under development and Code::Blocks is being actively worked on. >Is aesthetics important? The answer is subjective. I think aesthetics are …

Member Avatar for Gabriel_8
0
4K
Member Avatar for ~s.o.s~

>What are the answers for you questions? This thread isn't about answers, it's about providing questions for you to answer on your own. If you're having trouble, start your own thread to get help.

Member Avatar for gyno
22
7K
Member Avatar for guest7

I'm not sure I understand what you want to do, but even more so I don't understand why you want to do it. Can you be more specific? I'm guessing you're trying to solve a non-issue.

Member Avatar for Dasun_1
0
31K
Member Avatar for Narue

Just for fun, I wrote up a quick tutorial for basic assembly. At present, it's only in the form of a PDF document, but I'll eventually get around to adding it to my website.

Member Avatar for The Old Man
19
2K
Member Avatar for One more line

You can switch the console text color at will quite easily. Just change it to the desired color before printing the character, then change it back after printing the character: [code] #include <iostream> #include <windows.h> class TextAttr { friend std::ostream& operator<<(std::ostream& out, TextAttr attr) { SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), attr.value); return out; } …

Member Avatar for Maxime_2
0
4K
Member Avatar for elexender

When mounting the drive, it's either implicitly or explicitly given a mount point. You use that mount point as the path (it's just a directory). For example using sda1 as the default mount point: [code] file = fopen("/dev/sda1/file.txt", "a+"); [/code] Though it would be a good idea to support a …

Member Avatar for Erkan_1
0
2K
Member Avatar for Dave Sinkula

C Unleashed by Richard Heathfield and friends should cover most of what you need.

Member Avatar for shahidali6
11
10K
Member Avatar for naz1234

[QUOTE]my question is, why i got some error..I cant recognize such of that error...[/QUOTE] What's the error? :icon_rolleyes:

Member Avatar for jeevz
1
5K
Member Avatar for ilovec++

[QUOTE]By the way, the book I was using was published in 2008, so how come it has so old instructions???[/QUOTE] What book is it? Most likely it's on the "not recommended" list.

Member Avatar for yoavip
0
565
Member Avatar for Ghost
Member Avatar for adnan_6
0
2K
Member Avatar for cblue

It's an ordered list, so all you need to do is break off the search when the node's value is not less than the new item. To test for a duplicate, check and see if the next node has the same value as the new item: [code] // Empty list …

Member Avatar for drussell024
0
3K
Member Avatar for Anil2447

[QUOTE]Variation in such a big range..[/QUOTE] Variation is expected. A better test would take the mean and standard deviation of multiple runs. [QUOTE]Is the time outputting in nanosecond..???[/QUOTE] The result is clock ticks, for whatever your implementation decides that to be. While still non-portable, a better method is like so: …

Member Avatar for Talha_5
0
9K
Member Avatar for cassie_sanford

>My friend and i were having a discussion the other day and we were >having a heated argument about how to make that dang diamond >pattern in C++ code A heated discussion, huh? Why not just write the damn thing and be done with it? There's not exactly anything to …

Member Avatar for NathanOliver
0
441

The End.