1,265 Posted Topics

Member Avatar for shazzy99
Member Avatar for Punkis448

what about marriages in Belgium, Canada, Netherlands, Norway, South Africa, Spain, Sweden, Aruba, Antilles, Israel, and the U.S. states of Iowa, Massachusetts, Connecticut, Maine, Vermont, and New York? I believe your algorithm fails. .

Member Avatar for jephthah
0
348
Member Avatar for Church

there are 26*26=676 permutations. that's easy to "brute force" the trickier part will be getting the computer to recognize when the solution has been found. a possible intermediate stage to this program could be to allow the user to choose which letters are substituted, updating the output each time. this …

Member Avatar for NeoKyrgyz
0
243
Member Avatar for Dewey1040

theres no way to tell whats going on by the sparse amount of code you've posted. the problem, i'll wager, is likely in your "load complex" function, whatever that is...

Member Avatar for jephthah
0
174
Member Avatar for waphon

holy ESL, Batman. :icon_rolleyes: seriously, though... this is like some sort of advanced undergrad or first-year grad school project. if you've made it this far to be assigned this sort of problem, you damn sure better be prepared and able to do the majority of the work yourself. post some …

Member Avatar for ArkM
0
171
Member Avatar for jephthah

[B][U]PROBLEM: [/U][/B] noobs are continually posting mountains of unhighlighted code, and its just nearly impossible to read such messes without highlighting... i dont even want to try, it hurts my head. making this worse is the people who need the most help are the same people who are the worst …

Member Avatar for FlamingClaw
2
218
Member Avatar for jephthah
Member Avatar for kaku_lala

i'm sorry, but why would anyone WANT to use floats as a boolean type? that's like taking the most basic thing in the world, and purposely making it complicated and unreliable.

Member Avatar for Narue
0
186
Member Avatar for serkan sendur

[QUOTE=serkan sendur;863245] right after the strip club my english sounds like native. [/QUOTE] what are you saying, you can order a beer and a lap dance just like a good ol' boy? your reputation as "creepy internet stalker dude", just keeps getting more and more entrenched. seriously. do you know …

Member Avatar for ~s.o.s~
0
535
Member Avatar for Ancient Dragon
Member Avatar for CoolAtt

ArkM's method is sufficient, but i prefer this way. [code=c]buf[strcspn(buf,'\n')] = '\0';[/code] it's just a single line of code that will replace the newline with a NULL, if a newline is found, or will do nothing if one is not there .

Member Avatar for Aia
0
5K
Member Avatar for tasosa

How Many Times ... are you going to [URL="http://www.daniweb.com/forums/search8501309.html"]post this same problem in different threads[/URL] what was wrong with [URL="http://www.daniweb.com/forums/thread189653.html"]the advice Narue gave you just four days ago?[/URL]

Member Avatar for BestJewSinceJC
0
109
Member Avatar for vddmanikanta
Member Avatar for kaku_lala

the fact that it doesnt terminate the string with a NULL is the error. a string must have a NULL termination, or else it's just a character array.

Member Avatar for ArkM
0
133
Member Avatar for Liszt

use sockets. [URL="http://beej.us/guide/bgnet/"]Beej's Guide[/URL] is probably one of the best general-purpose reference guides available.

Member Avatar for Liszt
0
1K
Member Avatar for kaos

any int variable is inherently an *integer* the value is not stored in any particular base .... hex or decimal or binary, it doesnt matter. the only difference is when you print it. [icode]printf("hex value %04X = decimal value %d\n",Dec, Dec);[/icode] but also, what youre asking to do is to …

Member Avatar for VatooVatoo
0
95
Member Avatar for moiron

use "strlen" and check character ranges. look at your ascii table. post some code if you want any more advice.

Member Avatar for dmachop
0
175
Member Avatar for ngibson12

the prototype for itoa is: [icode]char * itoa ( int value, char * str, int base );[/icode] but it's really a bad function to use as it's not portable. use sprintf, instead: [icode]sprintf(buf,"%d",sum);[/icode] another problem you may be having is, how is "buf" terminated? what do you expect is at …

Member Avatar for jephthah
0
168
Member Avatar for BimanD
Member Avatar for NicAx64
Member Avatar for NicAx64
0
134
Member Avatar for NicAx64
Member Avatar for Toila

HERE is how you do it: use two pointers. an input and an output, both pointing to the start of the source string. compare the input pointer character to each of your key characters. if you have a match, increment your input pointer only. if you dont have a match, …

Member Avatar for WaltP
0
2K
Member Avatar for Erroneous Seth
Member Avatar for VernonDozier

there are over 39,000 people in the U.S. with my real name. there are 1 or fewer people in the U.S. with my screen name.

Member Avatar for sneekula
2
485
Member Avatar for bilawal420

[QUOTE=bilawal420;862780]plz someone reply me quickly[/QUOTE] well, i was getting ready to reply, but then i got to that last part and just lost interest.

Member Avatar for siddhant3s
0
75
Member Avatar for AfroZenPizza

no it's not portable. there is no truly portable solution. you'll have to #define the sleep routine according to the detected OS at build time.

Member Avatar for jephthah
0
67
Member Avatar for peste19

cycle through each lettter in the alphabet, a through z, and check each letter if it repeats. remember that ascii code character A is decimal 65 and Z is decimal 90. lowercase a is decimal 97 and lowercase z is 122. you can subtract 32 from any lowercase letter to …

Member Avatar for NathanOliver
0
1K
Member Avatar for folkdancer

glad you got it figured out. dont worry about the double posting. it happens to almost everyone at some point, somewhere. there are worse things one could do. :)

Member Avatar for jephthah
0
100
Member Avatar for smitem03

what's the problem saving the data? as in, what's it doing or not doing that doesn't seem right to you? if you want a new file to be written with the data, then you're using fopen correctly.... "w" (write) will delete the contents of the existing file, if any, before …

Member Avatar for jephthah
0
92
Member Avatar for boujibabe

(1) this thread was dead and buried, until "lolguy" dug up the bloated corpse to defile it even further (2) the original code is an example of what not to do. don't spend any time thinking about it.

Member Avatar for jephthah
0
201
Member Avatar for disspointed

just because you're in the same Indo-European linguistic family, doenst mean teh language is going to appear to be at all related. it's a HUGE group... :P anyhow, good luck. English is a notoriously difficult language to learn due to the widespread borrowing of words, odd colloquialisms, and multiple exceptions …

Member Avatar for ambalika
0
305
Member Avatar for karthik.c

when you build your program and it complains: "warning: implicit declaration of function `memset'" ... you have to pay attention to that. memset() and memcmp() require that you #include <string.h> theres could be other issues, but start with that and lets see what happens. .

Member Avatar for karthik.c
1
151
Member Avatar for slim2hott

wait, what? its been three days ... why haven't you guys finished helping this kid write his spyware program, yet? who do i give neg rep to?

Member Avatar for NathanOliver
-2
677
Member Avatar for BlackStar

maybe i'm missing something here? but i think perhaps you're making this too hard. [icode]*A = *B[/icode] changes the [I]contents[/I] of A to become the same [I]value[/I] as the contents of B. [icode]A = B[/icode] changes the pointer address of A, to point instead to the memory location currently pointed …

Member Avatar for BlackStar
0
245
Member Avatar for grandalf62

do you need to be limited to storing 100 bytes? because if you kept a record of all possible 256 bytes, you could make it both faster and more memory-efficient. example: instead of actually copying and storing the value of 256 (or even 100) separate bytes, you really only need …

Member Avatar for jephthah
0
89
Member Avatar for metal_butterfly

eh, i feel like i'm trapped in an Escher painting. anyhow, metal_butterfly, there could be any number of reasons why your server is refusing the connection from your client [url]http://technet.microsoft.com/en-us/library/cc975854.aspx[/url]

Member Avatar for xyzt
0
105
Member Avatar for TheBeast32

i used this library several years ago for a project... it's quite impressive.... however, i don't really remember anything to help you with. so, i don't want to sound dismissive, but i think this sort of highly specialized library you'll probably find more precise help on their mailing list or …

Member Avatar for jephthah
0
191
Member Avatar for ongpong
Member Avatar for Ancient Dragon
0
119
Member Avatar for serkan sendur

LOL WUT? is this a love letter to Narue? well... damn. I just don't know [URL="http://www.thewolfweb.com/photos/00505003.jpg"]what else to say[/URL]. .

Member Avatar for serkan sendur
-1
418
Member Avatar for Ancient Dragon

i call shenanigans. this scheme assumes every city with a population this side of Irvine, CA (pop ~201,000) will be completely devastated. anyhow, the 1980's called: they want their mass scare back. :P .

Member Avatar for GrimJack
0
72
Member Avatar for Crago3
Member Avatar for legendarya49

this is C. "bool" types are not allowed. neither are you allowed to declare variables within a for loop's conditional statement. the fact that you are able to get away with it using a C++ compiler doesn't matter. standard C compilers this fails to compile\ that said, ive gone ahead …

Member Avatar for jephthah
0
203
Member Avatar for kelechi96

[QUOTE=siddhant3s;855531] And if two files are different, their md5sum hash will of course be different.[/QUOTE] not true. MD5 is broken. in 2004, Wang et. al. demonstrated that forced MD5 collisions could be generated; in December 2008 the Chaos Communication Group forged an SSL certificate using forced MD5 collisions, in March …

Member Avatar for jephthah
0
456
Member Avatar for Gary0

Commodore PET. oh gawd, i remember that. my first computer book was "Programming the PET"... i think i still have it somewhere at my folks' house.

Member Avatar for jephthah
1
138
Member Avatar for anujsharma

walt is right: everything is "urgent" ... youre lucky today is a slow day. and don't use feof in a while loop to break on the end of a file. use instead [URL="http://www.cplusplus.com/reference/clibrary/cstdio/fgets/"]fgets()[/URL] to read one full line at a time, and parse what you need out of that line …

Member Avatar for jephthah
0
447
Member Avatar for pt_solar
Member Avatar for nschessnerd
Member Avatar for tfurrows

is strval a single char that is a numeral character between 0 - 9? then you cant just recast it as an int. to convert a character numeral to it's integer value, you have to subtract 0x30 (decimal 48) from the character (ascii) value. [icode]int value = (int)strVal - 48;[/icode]

Member Avatar for jephthah
0
120
Member Avatar for roryt

what about an option to "rehabilitate" a banned member who wanted another chance? like a one-chance sort of thing where you're in probationary status, repeat offense would be irrevocable? i guess that would redefine "ban" into something more like a suspension, though. eh, probably not a good idea; just throwing …

Member Avatar for jephthah
0
534
Member Avatar for cool_aj

yeah, i could probably help you with this, but unfortunately you didnt use code tags, so it's all but completely unreadable. next time, try this: [noparse][code=c] your code goes here [/code][/noparse]

Member Avatar for cool_aj
0
115

The End.