5,676 Posted Topics
Re: It also depends on the compiler you are using. Only a few compilers can really do what you want. | |
Re: Use the functions [ICODE]srand()[/ICODE] and [ICODE]rand()[/ICODE] to roll the dice. | |
Re: Write a VB system that connects to a genetic machine that makes clones whose sole purpose it to use your database. | |
Re: You have to Package the program, not just compile it. This will set up a distribution package that includes all the other files the .exe needs in order to run. | |
Re: [B]gerard[/B], please don't fix people's code for them with no explanation. They learn nothing. [B]solitude_spark[/B], the problem is you specified [iCODE]#include <file1.h>[/iCODE]. The <brackets> tell the compiler to look in the compiler and system directories but not in the current directory. To search in the current dir use "double quotes" … | |
Re: I usually do it with this: [code] if (kbhit()) { ch1 = getch(); if (ch1 != '\0') { // process a normal keystroke } else { ch2 = getch(); // get the arrow or function key switch(ch2) { // process the arrow or function key } } } [/code] You … | |
Re: It's' much easier for us to help if you supply us with an attempt at the ReduceFraction() function. That way we know what you need help with. | |
Re: Stop using [ICODE]scanf()[/ICODE] and [ICODE]fscanf()[/ICODE]. They won't work for you because of your data, and you don't know how to use them -- which is a good thing, actually. Please explain this loop: [CODE] while (!file.eof() ) { string line; getline(file, line); cout << line; [/CODE] What does it do? … | |
Re: [QUOTE=priyarrb;1121084]This is an CPU sheduling algorithm i.e proirity sheduling .It show some error that i can't solve please anyone correct it . its very urgent.[/QUOTE] 1) This is not a CODE SNIPPET. Do not post questions as such 2) [I]Help Me[/I] is a title in violation of the Forum Rules. … | |
Re: Read the file, add the file fruit to the list, output the list back to the file. Open Read in loop Close Open Write in loop Close | |
Re: [QUOTE=cnidhi007;1120451]Hi! [/QUOTE] Hi [QUOTE=cnidhi007;1120451] I want to read a dbf file in c/c++/vc++. Which platform would be ideal? [/QUOTE] Any platform will do it. [QUOTE=cnidhi007;1120451]And how should I go about it? Regards, Nidhi[/QUOTE] Understand the database file format. That's most of the battle -- and in the case of .dbf, … | |
Re: [QUOTE=ankush.mukherje;1111297]Hi malloc is the best practice to do programmings like Fibonacci [/QUOTE] Why? | |
Re: [url=http://www.cplusplus.com/reference/clibrary/cstdlib/srand/]See this[/url] | |
Re: Nest loops by putting one inside the other: [code] while (xxx) { for (x;y;z) { do { } while (aaa); } } [/code] | |
Re: Convert it to a string, remove trailing 0's, the output the string. | |
Re: [QUOTE=atticusr5;1120243]hey everyone, I got a weird error when I run my program. I compile and link and run the program through the terminal in Ubuntu. I have to compile or linking errors, and the program run's fine, except when the program asks: "Would you like to see a display of … | |
Re: By not using [iCODE]scanf()[/iCODE]. You need to read the entire input as a string and validate each character. If it validates properly, convert the input to an integer. Look at [iCODE]fgets()[/iCODE] Actually, using C++ you want [iCODE]getline()[/iCODE] | |
Re: OK, but you need to read the Forum Rules and the Sticky Posts first. | |
Re: [QUOTE=clutchkiller;1120064]HAH,why would you even give him a response. PLLLLSSSSSSSSSSSS[/QUOTE] Someone might ask that same question of you... :icon_rolleyes: | |
Re: This might get you started: [code=cpp] #include <iostream> #include <cstdlib> using namespace std; char diseaseDNNAsignature[] = { 0x41, 0x67, 0x65, 0x6E, 0x74, 0x3A, 0x20, 0x48, 0x69, 0x20, 0x46, 0x61, 0x72, 0x6D, 0x65, 0x72, 0x20, 0x46, 0x72, 0x65, 0x64, 0x2C, 0x20, 0x46, 0x61, 0x72, 0x6D, 0x65, 0x72, 0x20, 0x4A, 0x69, 0x6D, … | |
Re: [QUOTE=niek_e;1119683][CODE] int size; [COLOR="Red"]// not assigning a value here[/COLOR] cin>>size;[/CODE][/QUOTE] So? If the value is not used [I]before[/I] the [ICODE]cin[/ICODE], why do you need to set it to a value before that? | |
Re: [QUOTE=Acrimonus;1119920]Wut are question marks nerr.[/QUOTE] And how about [I]you[/I] read [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies#faq_keep_it_clean]this[/url] (paragraph 1) | |
Re: Assuming you wrote [I]Standard C++[/I] it should work with only minor changes. If you didn't, you'll have to find another way of fixing the error (change in function, or even concept). Start by compiling and fixing any errors that pop up. | |
Re: The [iCODE]system()[/iCODE] command can't find [B]Notepad[/B]. I'll bet it could find [B]Notepad.exe[/B] though... [QUOTE=VernonDozier;698208]16 bit compiler? [/quote] Turbo C probably... [QUOTE=VernonDozier;698208]DOS command? [/quote] cmd.exe -- console. Many people still think of it as DOS. | |
Re: "My car won't go. Please help." Do you think your mechanic could do anything with this information? | |
Re: Do not post help requests as Code Snippets. Use CODE tags. Don't post your email address. | |
Re: [QUOTE=karthiken07;1116130]How to create Run as Administrator option of windows OS in c code.. It is required for my software. plz help me.[/QUOTE] How to ask questions here -- [url=http://www.daniweb.com/techtalkforums/thread78223.html]read this[/url] and [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]this[/url]. It is required for this forum. | |
Re: And you don't need to call a function to exit, just [iCODE]return 0;[/iCODE] | |
Re: [QUOTE=atticusr5;1119083]that worked but now I am getting a whole slew of new errors when I try to compile the same code on my home ubuntu machine here are the new compiler errors: assign6.cpp: In member function ‘char cAccount::get_accountName(char (&)[15])’: assign6.cpp:24: error: ‘strcpy’ was not declared in this scope [/quote]So where … | |
Re: Resurrecting a 6 year old thread to post a question like this is asinine. Read the rules and start your own thread! | |
Re: [QUOTE=smarty_t2;1117018][QUOTE=Salem;1116942]None that I can be bothered to mention any more, thanks to your vague requirements.[/QUOTE] Its not vague... Can someone else please help....[/QUOTE] If [B]Salem[/B] can't understand what you need, believe us, your description is very vague... You can't prove it isn't by simply saying so. | |
Re: Snobol is designed specifically for string manipulation | |
Re: Anytime you want a special character in a string, you use [B]\x[/B] where [B]x[/B] is the character. Therefore, the [B]\[/B] itself is a special character, too. So you must use [B]\x[/B] format to add one -- hence [B]\\[/B] | |
Re: Reformatting slightly, is this what you really want? [code=cpp] rectangleType::rectangleType(double l, double w ) :lineType(l) { width=w; }//end lineType constructor [/code] | |
Re: [QUOTE=BobbieJean;1118867]Please forgive me...I'm still new posting anything in these forums but...code tags? I'm sorry. That probably seems stupid of me to not know what that means. Like I said, I'm new to posting in these forums and as far as programming goes, I'm still pretty new to that too. I'm … | |
Re: The way I read the files from a directory was similar to: [code] $filhnd = @opendir($dirname); if (!$filhnd) { printf ("<b>Directory [%s] not opened </b><br />", $dirname); } else { while ($fil = readdir($filhnd)) { ## now $fil contains a filename from the directory. ## It could be anything, even … | |
Re: I don't understand. First you say [QUOTE=dondajr;1113854]For example: I have the str1 = "Jhon" and str2 = "Lucas"[/quote] Then you say [QUOTE=dondajr;1113866]but if my string was like that: "35:Jhon\135:Lucas"[/quote] So which is it? [QUOTE=dondajr;1113866]The escape does not works well because the 35.[/quote] So what's wrong with the 35? [QUOTE=dondajr;1113866]What I … | |
Re: Set grade total to 0 Start a loop. For each input, add the appropriate value to grade total Count each input. You can figure out how/when to end the loop and calculate the rest of the grade | |
Re: Start month at 1 (January) If your day > #days-in-January Subtract #days-in-January from your day, add one to month. If your day > #days-in-February Subtract #days-in-February from your day, add one to month. etc. The first time day <= #days-in-'month', you have your answer. Set up a loop and an … | |
Re: [QUOTE=m_adeelkhan;1117132]i need help in making c++ code for tic tac toe on 7x7 board by using mini max and alpha beta where 4 in a row ,column,and diagonal are winning state , if some 1 can share code it will be quite help full 4 me[/QUOTE] We don't write code … | |
Re: So declare [iCODE]total[/iCODE]. What type of variable is it? | |
Re: Sure. [url=http://www.gidnetwork.com/b-66.html]Read this[/url]. | |
Re: [QUOTE=isralruval;1117618]This code you are asked to input a number and it will tell u wheter or not the input you entered is in the array or not i am having issues with this code and its giving me some errors, if anyone wants to help me out it will be … | |
Re: For UP, if number is MIN, set number to MAX. For DOWN, if number is MAX, set number to MIN. | |
Re: 1) [url=http://www.gidnetwork.com/b-38.html]Format[/url] your code so we can easily follow it 2) Never paraphrase an error -- give it to us exactly! 3) Out of 145 lines, which one has the error? 4) [iCODE]main()[/iCODE] is an [I]int[/I] function -- see [url=http://www.gidnetwork.com/b-66.html]this[/url] 5) Why are you using [I]conio.h[/I]. There is nothing in … | |
Re: [QUOTE=stjohn999;1117172]this is my daughters homework she asked me to help and now im stuck she has worked it out and is making me look stupid need to get my selfrespect back even if i have to cheat(i used my brain and im asking you) the code is as follows but … |
The End.