5,676 Posted Topics

Member Avatar for SpyrosMet
Member Avatar for Duoas
0
210
Member Avatar for FreakNFlow

Use the functions [ICODE]srand()[/ICODE] and [ICODE]rand()[/ICODE] to roll the dice.

Member Avatar for WaltP
0
90
Member Avatar for Kinfe

Write a VB system that connects to a genetic machine that makes clones whose sole purpose it to use your database.

Member Avatar for Kinfe
0
332
Member Avatar for charqus

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.

Member Avatar for charqus
0
155
Member Avatar for solitude_spark

[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" …

Member Avatar for Nick Evan
0
86
Member Avatar for Diode

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 …

Member Avatar for hsp700
1
4K
Member Avatar for batman3
Member Avatar for angel6969

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.

Member Avatar for angel6969
0
275
Member Avatar for Mz3g

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? …

Member Avatar for Mz3g
0
363
Member Avatar for priyarrb

[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. …

Member Avatar for abhimanipal
-1
144
Member Avatar for ubi_ct83

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

Member Avatar for WaltP
0
72
Member Avatar for cnidhi007

[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, …

Member Avatar for Salem
0
265
Member Avatar for miles.85
Member Avatar for mfrancis107

[QUOTE=ankush.mukherje;1111297]Hi malloc is the best practice to do programmings like Fibonacci [/QUOTE] Why?

Member Avatar for WaltP
0
157
Member Avatar for Jerail

[url=http://www.cplusplus.com/reference/clibrary/cstdlib/srand/]See this[/url]

Member Avatar for Jerail
0
424
Member Avatar for ttunstall07

Nest loops by putting one inside the other: [code] while (xxx) { for (x;y;z) { do { } while (aaa); } } [/code]

Member Avatar for WaltP
0
123
Member Avatar for XStrong
Member Avatar for atticusr5

[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 …

Member Avatar for atticusr5
0
88
Member Avatar for Xorifelse

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]

Member Avatar for WaltP
0
141
Member Avatar for vicsta
Member Avatar for ayushii

[QUOTE=clutchkiller;1120064]HAH,why would you even give him a response. PLLLLSSSSSSSSSSSS[/QUOTE] Someone might ask that same question of you... :icon_rolleyes:

Member Avatar for WaltP
-5
101
Member Avatar for abraham james

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, …

Member Avatar for WaltP
-2
105
Member Avatar for Suraine

[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?

Member Avatar for WaltP
0
10K
Member Avatar for vvirendra

[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)

Member Avatar for WaltP
-3
102
Member Avatar for esesili

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.

Member Avatar for WaltP
0
123
Member Avatar for scholar

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.

Member Avatar for WaltP
0
248
Member Avatar for blahhaha

"My car won't go. Please help." Do you think your mechanic could do anything with this information?

Member Avatar for WaltP
0
129
Member Avatar for thirupathireddy

Do not post help requests as Code Snippets. Use CODE tags. Don't post your email address.

Member Avatar for abhimanipal
0
113
Member Avatar for karthiken07

[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.

Member Avatar for ChaseVoid
-1
165
Member Avatar for rsaska
Member Avatar for atticusr5

[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 …

Member Avatar for vmanes
0
105
Member Avatar for kellyandtopher

Resurrecting a 6 year old thread to post a question like this is asinine. Read the rules and start your own thread!

Member Avatar for WaltP
0
82
Member Avatar for smarty_t2

[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.

Member Avatar for VilePlecenta
0
762
Member Avatar for rehber344
Member Avatar for Bankai Hikari
Member Avatar for lima01

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]

Member Avatar for lima01
0
167
Member Avatar for scott6480

Reformatting slightly, is this what you really want? [code=cpp] rectangleType::rectangleType(double l, double w ) :lineType(l) { width=w; }//end lineType constructor [/code]

Member Avatar for WaltP
0
130
Member Avatar for BobbieJean

[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 …

Member Avatar for WaltP
0
665
Member Avatar for Midnite002

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 …

Member Avatar for Stefano Mtangoo
0
321
Member Avatar for dondajr

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 …

Member Avatar for dondajr
0
287
Member Avatar for xiaodi
Member Avatar for manchesterutd

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

Member Avatar for WaltP
0
77
Member Avatar for clutchkiller

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 …

Member Avatar for clutchkiller
0
308
Member Avatar for m_adeelkhan

[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 …

Member Avatar for WaltP
-1
158
Member Avatar for C++ Beginner
Member Avatar for C++ Beginner
0
373
Member Avatar for abhimanipal
Member Avatar for Narue
0
243
Member Avatar for isralruval

[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 …

Member Avatar for jonsca
0
116
Member Avatar for dude1

For UP, if number is MIN, set number to MAX. For DOWN, if number is MAX, set number to MIN.

Member Avatar for jonsca
0
160
Member Avatar for bryangarcia

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 …

Member Avatar for WaltP
0
124
Member Avatar for stjohn999

[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 …

Member Avatar for WaltP
-1
80

The End.