5,676 Posted Topics
Re: TextBox3.value = val(TextBox1.text) +val(TextBox2.text) | |
Re: [QUOTE=qaisu;339924] now if you want to give a range you can do it by this syntax (minimum+rand())%maximum; for example if you want to generate the numbers between 1 and 10,000 simply do it this way (1+rand())%10000; [/QUOTE] Not quite. it's [INLINECODE]minimum + (rand() % maximum);[/INLINECODE] | |
Re: A couple other things. See [url=http://www.gidnetwork.com/b-56.html]this about gets()[/url]. See [url=http://www.gidnetwork.com/b-38.html]this about formatting[/url]. You need indentation and whitespace. After you read the first character, then read the rest of the line, the rest of the line does not contain the first character. so the compare never works. Why not just use … | |
Re: [QUOTE=Senel;340245]any hint on each question how to begin with... i have exams tomorrow ><[/QUOTE] Better late than never, eh? ;) Hints? OK: [QUOTE=Senel;340233]Q1)Write a program that read two integer and determined and prints if the first is a multiple of the second? {Hint: Use the modulus operator.} ?[/QUOTE]Read about the … | |
Re: Or: [code=cplusplus] int main() { int rtn; ... if (Get( cin, d1, d2, d3, d4, d5)&& Valid( d1, d2, d3, d4, d5 )) { cout << "The code has been vaildated" << endl; rtn = 0; } else { cout << "The code is invalid"; rtn = 1; } getchar(); … | |
Re: VB Script [I]is[/I] for html pages. You might want actual VB programs, which is harder. What is it you want to do? There may be something better out there for you. | |
Re: Two options: #1) [B]Lerner[/B]'s idea will work well #2) Input the number as a string of characters. If you input [B]3157[/B], you wil have a string with '3','1','5','7'. Each character is then converted to an integer by subtracting '0', or 48. | |
| |
Re: Open the header file in an editor and take a look? Or cheat and look [url=http://www.dinkumware.com/manuals/?manual=compleat&page=index.html]here[/url] :) | |
Re: [QUOTE=Aia;339521][QUOTE=Ancient Dragon;339460]you can read the novel War And Peace between compiles.[/QUOTE] Good one :). Not only do programming work but also you get educated in literacy.[/QUOTE] Hmmm. I read the comic pages. Should I change? [QUOTE=~s.o.s~;339427]Psst..don't let Walter hear this. He can infract you, you know. :D[/QUOTE] Who's [B]Walter[/B]:?: | |
Re: [QUOTE=vijayan121;339279]u ... u ... u ... u ...[/QUOTE] :confused: [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies#faq_keep_it_clean]Read this[/url] please. | |
Re: [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies#faq_keep_it_organized] Read this[/url] | |
Re: All you're trying to do is output the values in order. That's not a sort. Check if [b]x > y[/b]. If so, move [b]x[/b] into [b]y[/b] and [b]y[/b] into [b]x[/b] (switch the values). Then do it again for [b]y[/b] and [b]z[/b]. You'll have to go back and retest [b]x[/b] and … | |
Re: [QUOTE=iamthwee;339285]I don't think that would work.[/QUOTE] [QUOTE=Queatrix;339287]Why not?[/QUOTE] Agree. If you're going to complain about something, the least you can do is give [I]some[/I] kind of explanation. | |
Re: [QUOTE=The Dude;337671]Everyone viewing this thread [b]PLEASE SIGN THE PETITION[/b] (Even if you live outside the USA -- We would do it for you if your country was @ risk of losing something so loved)[/QUOTE] And get the petition thrown out because of 'petition tampering'? Only US residents should sign it. … | |
Re: [QUOTE=teh_man;336831]Hey All i am making a connect four game. I have done most of the code but need help in some bits 1) Which is how to code to see if there a win from vertical, horizontal or diagonal. - The Grid is 7 by 7. - I no idea … | |
Re: See [url=http://www.gidnetwork.com/b-61.html]this[/url] about [INLINECODE]system("pause");[/INLINECODE] [INLINECODE]system("cls");[/INLINECODE] is conceptually similar. | |
Re: [QUOTE=ft3ssgeek;338428]As for part 1, I believe the instructions are referring to c-strings...how much do you know about c-strings?[/QUOTE] I don't think so. Although, I don't know what the instructions mean, either. Can you give us an example of the operation? | |
Re: Contact hit company [URL]http://www.hitcorporation.com/[/URL] and ask them how to interface with their modale MP200. | |
Re: [QUOTE=vijayan121;338745]since we are using std::string, why not [code] #include <iostream> #include <string> using namespace std; int main() { string str ; cin >> str ; const string vowels = "aeiouAEIOU" ; int n_vowels = 0 ; for( string::size_type pos = str.find_first_of(vowels) ; pos != string::npos ; pos = str.find_first_of(vowels,pos+1) ) … | |
Re: [QUOTE=7arouf;338735]i have no idea i hope sombody will help[/QUOTE] Two people already have -- [B]Wolfie[/B] directly answering your question, [B]SOS[/B] explaining something you need to understand. And here's a third: TTT is played on a 3x3 grid, therefore you should consider using a 3x3 array (matrix), like [INLINECODE]char grid[3][3][/INLINECODE] | |
Re: [QUOTE=guy40az;337121]Well I am using VC 6.0 because it was given to me to learn c++.[/QUOTE] And it's fine for learning C++. It follows enough of the standard that you won't have to worry about it. Compilers aren't like stereo systems where you have to have the latest and greatest every … | |
Re: Your desk-check of the first call (6) is wrong. | |
Re: [QUOTE=iamthwee;337218]Yes you can do the same in c++ so use cout in c++. Period.[/QUOTE] Wanna bet? Ongoing challenge no one has solved yet: [i][color=blue]Convert this printf() statement into [u]readable[/u] C++, output must match exactly:[/color][/i] [code] int iVal = 2; int hVal= 0x0C; char *filename = "test.fil"; char *username = "juser"; … | |
Re: [QUOTE=Jamuna;338201]hi pooja this is jamuna i need ur help [/QUOTE] If [B]pooja[/B] is having trouble programming, is [B]pooja[/B] your best source for help? [QUOTE=Jamuna;338201]have u clear those errors in this program?if so post it and i want to clarify one doubt with u.[/QUOTE] Does your instructor want you to use … | |
| |
Re: [QUOTE=jan1024188;337260]Hello, I wanna know if there is any way to make a window transparent using Win32 API Thanks in advance, Jan[/QUOTE] I see lots of possible answers putting the important parts of your question in google... | |
Re: [QUOTE=XxBigxBossxX;337917]I'm trying to code the game of Simon(try to mimic the computers choice of four buttons) for a project. I'm kind of stuck because the computer generates a random choice, but I need to completely halt and wait for the user to enter his choice.(Done with the aswd keys; either … | |
Re: You know, I just went through this entire thread and saw absolutely no code by [B]Jerry[/B]. How can we help if you won't even try anything suggested, and/or won't post what you've tried? | |
| |
Re: Accept the name using 3 inputs for first, middle, last. Store the answers in 3 strings. If you enter nothing, the string is empty. | |
Re: Are we talking about doing something that back in 1995 the computer industry left behind? Are you running DOS or a command line from XP? And is this homework from a school teaching obsolete practices or from your Dad's (or Granddad's?) old textbook? | |
Re: See: [url=http://www.gidnetwork.com/b-38.html]this[/url], [url=http://www.gidnetwork.com/b-57.html]this[/url], and [url=http://www.gidnetwork.com/b-56.html]this[/url] And nothing is urgent on this board... ;) | |
Re: [QUOTE=Infarction;337070]Try just using <iomanip>. I'm guessing that you have VC6.0 or something at school, which uses old (deprecated) headers. [/QUOTE] It uses the new headers, too. | |
Re: Please [url=http://www.gidnetwork.com/b-38.html]format your code[/url] so we can read it easier. It's something you need to do if this programming game is important to you. | |
Re: I'm sure he's been waiting around for 4 months just hoping you'll give him a solution. :rolleyes: | |
Re: I assume you don't care about "the compiler under the hood" but how the compiler is used/interfaced. I personally prefer [url=http://www.borland.com/downloads/download_cbuilder.html]Borland 5.5[/url]. Grew up on the command line so I get to use my editor of choice ([url=http://vedit.com]VEdit[/url]) rather than learn the editor they choose for me. | |
Re: [B]RaCheer[/B]. please consider [url=http://www.gidnetwork.com/b-38.html]formatting[/url] your code better. You really need to indent so the code can be followed. | |
Re: [QUOTE=afr02hrs;332233]The corrections print out each word of the sentence entered on a seperate line. One word per line. I am trying to get the program to remove multiple spaces entered between words but print out the new sentence with only 1 space per word (all on the same line). I … | |
Re: [QUOTE=davidcairns;336029]Since your code looks correct the only thing I can think is that the OS you are on is forcing the 8.3 filename convention. [/QUOTE] Not likely since VB only works on $M Operating systems which don't have 8.3 limitations. | |
Re: Look at the first character If it's a digit, call a function that converts the next values up to the comma into a number. Return the next location (pointer or index) in the string just after the comma If it's a ", call a function that moves everything up to … | |
Re: 2 things, please #1) [url=http://www.gidnetwork.com/b-38.html]Format your code[/url]. We'd like to be able to read it and help you. #2) [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies#faq_keep_it_clean]English, please[/url]. This is a professional programming board, not a chat room. | |
Re: [QUOTE=robotnixon;335811]Thanks a lot. It's reading the file just fine now but I noticed another problem after running through a couple generations. I neglected to include a command to populate a cell with three neighbors. No kids means everyone just slowly dies out. Here's the relevant code (let me know if … | |
Re: Hasn't anyone mentioned [url=http://www.gidnetwork.com/b-38.html]code formatting[/url] yet? You need to indent your code so we can follow it. And your titles need work -- [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies#faq_keep_it_organized]see this[/url]. Any more lame titles also warrants an infraction. | |
Re: [QUOTE=bigben09;335393]where does the sprintf() go i have never used that or seen that before I am new and just learning the ropes.[/QUOTE] Since you're using C++, might as well stick with [INLINECODE]setw[/INLINECODE] And hasn't anyone mentioned [url=http://www.gidnetwork.com/b-38.html]code formatting[/url] yet? You need to indent your code so we can follow it. | |
Re: Oh, Salem, you're so funny :D All [I]compiled[/I] languages are converted into machine language by the compiler. Then finally into executable code that the operating system executes. Also, please [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies#faq_keep_it_organized]read this[/url] | |
Re: [QUOTE=joeprogrammer;334332]>my problem is, that i have been trying to use a counter to display the average and im stumped The problem is that you need to store the data in some sort of array -- preferably a vector, and then you can calculate the average.[/QUOTE] Why? Go simple. In this … | |
Re: [QUOTE=Lerner;335146]But then again, maybe I am blowing smoke in the wind.[/QUOTE] Yeah, it's somewhat smoky in here... :D [QUOTE=Ancient Dragon;335090]what compiler are you using? I tried to compile it with three diffeent compilers and none of them knew about strptime().[/QUOTE] It seems to be the reverse of [INLINECODE]strftime()[/INLINECODE] in [url=http://linux.about.com/library/cmd/blcmdl3_strptime.htm]*nix[/url] … |
The End.