481 Posted Topics

Member Avatar for AorA

use a switch statement, then call the function you are after. [CODE=C++]switch(b){ case 1: menu1(); break; case 2: menu2(); break; case 3: menu3(); break; default: std::cout << "Invalid Choice!"; break; }[/CODE] I think that is what you are after, Chris

Member Avatar for AorA
0
186
Member Avatar for cloudii

The file will be read line by line. So the first line would be stored in the first variable. Ofcourse, if you want to make it possible to loop throught the file until all the variables are read in then your best bet would be to use and array (not …

Member Avatar for Freaky_Chris
0
174
Member Avatar for alin_yuhee

How well do you know the language, i'm guessing not too well. What kind of game do you want to make. A full blown first person shooter? or a guess the number game? Either way more input would be helpful aslong as sample code. Chris

Member Avatar for William Hemsworth
0
124
Member Avatar for masterovpuppetz

No, there is not standard C++ method of doing this, or at least not that im aware of. If your using linux i believe the ncurses or pdcurses headers may have something to heklp you out. If your on windows then you can use windows.h [CODE]ReadConsoleOutputCharacter( __in HANDLE hConsoleOutput, __out …

Member Avatar for masterovpuppetz
0
148
Member Avatar for tatainti55

You should have a read about functions and parameters. [CODE=C++]#include <iostream> int Plus(int x, int y){ return x + y; } int main(){ int number; int number2; char op; std::cout << "type in a number" << std::endl; std::cin >> number; std::cout << "another number" << std::endl; std::cin >> number2; std::cout …

Member Avatar for tatainti55
0
105
Member Avatar for nosa2008

indeed, you must use the cmath header... pow() and also sqrt() will find the square root of a number xD pow takes to aruments first is the number to be raised to the powerof the second number if that makes sense. Also i should talk about the chain rule. the …

Member Avatar for Freaky_Chris
0
104
Member Avatar for nasherizz13

Hey, enjoy your stay. This may help clear anything up that your unsure about if you wan't already use it, you should! [url]http://java.sun.com/docs/books/tutorial/[/url] Chris

Member Avatar for nasherizz13
0
135
Member Avatar for sanushks

strtok() would help. read some online documentation on it. It splits a string based on a delimiantor such as a pipe, this would allow you to retrieve all the different ssctions between the pipes. Then you could further process the {} out of the data. Chris

Member Avatar for sanushks
0
130
Member Avatar for nuubee

Wrong it does, pick a number >= 60 it will work fine. mpm is an integer, integer's ignore and decimal places, so and number small that 60 when divided by 60 would make mpm equal to 0, thus 0*2 = 0, so the program continues to loop multiplying 0 by …

Member Avatar for Ancient Dragon
0
249
Member Avatar for rugs267

If you are looking to convert strings and into integers, you may want to check out the atoi() function. Chris

Member Avatar for rugs267
0
110
Member Avatar for dexter1984

Just had a quick look but something im gonna point out. [CODE=C++]else if ((a >= 4) && (a < 5)) { romanF[i] = 'I'; romanF[i+1] = 'V'; a = a-4; i += 2; }[/CODE]could become [CODE=C++]else if (a==4) { romanF[i++] = 'I'; romanF[i++] = 'V'; a -= 4; }[/CODE] This …

Member Avatar for dexter1984
0
164
Member Avatar for alleycot

Ye this is true no respectable forums will do your assignment for you. So you have 2 choice's pay someone...again good luck cause most ppl still won't do this OR DO IT YOURSELF(at least have a good go) YAY im joining in with the free posts, i love it!

Member Avatar for Ancient Dragon
1
266
Member Avatar for acoxia

Btw, atoi() will convert it to a number, this may prove helpful for you to multiply your numbers. It will also convert it back to a char from a number. Chris

Member Avatar for acoxia
0
151
Member Avatar for TheNational22

Try using this [CODE=Python]if __name__ == '__main__': main()[/CODE] That may help. I'm guessing you are familiar with it, and therefor i don't need to explain Chris

Member Avatar for TheNational22
0
219
Member Avatar for siddhant3s

So you change the default program from notepad or whatever to your program, ofcourse this is all done in the registry. Which if you have a look through you will find that the extention .txt will trigger myapp.exe you can append a paramater on the end of that which represents …

Member Avatar for siddhant3s
0
115
Member Avatar for chrissygirl

[QUOTE=Denniz;705288]Is it part of the requirements to use recursive function? This program can be done easily without recursive function. Just use a loop is enough. Also, check out rand() function to generate random number, and srand() for seeding the random generator.[/QUOTE] Why would one need to generate a random number …

Member Avatar for tessen
0
254
Member Avatar for sunveer

you need to use getline() in that case to allows you to read more than just 1 character in at a time Chris

Member Avatar for bhoot_jb
0
127
Member Avatar for STUDENT#101

More information would be nice but im kinda guessing it a mere spelling error should it be double a=(h[0]*h[1])+...... Thats all i can guess from what you provided Chris

Member Avatar for Freaky_Chris
0
116
Member Avatar for Howe Marian

As in the favorites tab? Start-->Settings-->Taskbar & Settings. It's then the second tab along i believe that should allow you to restore your favorites Tab. Chris

Member Avatar for comlor
0
122
Member Avatar for Panithuli

Have a look at partioning software such as partition magic. This should run fine from boot of a floppy disk and allow you to delete all partition on the computer leaving it blank ready for OS installation. Providing the bios isn't screwed and will allow for boot from cd Chris

Member Avatar for comlor
0
112
Member Avatar for sgilgor
Member Avatar for mackone
0
79
Member Avatar for paulo_war

Hmm...show us some work? Lets see how far you get. Let us know where you get stuck. Read up on Lexical Analyzers...[url]http://en.wikipedia.org/wiki/Lexical_analysis[/url]

Member Avatar for paulo_war
0
107
Member Avatar for mhangman

I'm not sure if i understood you but i think you are after something like this, windows only all i could find [url]http://www.rutherfurd.net/python/sendkeys/[/url]

Member Avatar for Stefano Mtangoo
0
87
Member Avatar for tatainti55
Re: C++.

Check that gcc is installed in that location... if it isnt then change your compiler to look for it where ever it is installed. Chris

Member Avatar for tatainti55
0
117
Member Avatar for mugun

Indeed, however i have a feeling it may be a similar problem to this.... [CODE=C++]if (v1[j]==v1[i]) { v1[j]==""; }[/CODE] What exactly does this do?

Member Avatar for ArkM
-1
142
Member Avatar for sanchyvil

I trust you have installed all of the required libraries etc And set up all global varialbles. once all is set up i believe this should work [CODE]g++.exe "C:\file.cpp" -o "C:\File.cpp" -I"Include directory" -I"another include directory and so on" -L"libraries" [/CODE] and to run it [CODE]start C:\file.exe[/CODE]

Member Avatar for sanchyvil
0
355
Member Avatar for jetdreamer

@plum Aslong as he doesn't mind his program being 100% accurate the latter is good idea. A bit more information about the latter for you, time() comes with the including ctime, i'd suggest having a read about the ctime header and all of its functions [url]http://www.cplusplus.com/reference/clibrary/ctime/[/url] Chris

Member Avatar for unbeatable0
0
210
Member Avatar for anny**

My clue for you > Our Software Development forum category encompasses topics related to application programming and software design. When posting programming code, encase it in [code], [code=syntax], where 'syntax' is any language found within our Code Snippets section, or [icode], for inline code, bbcode tags. Also, to keep DaniWeb …

Member Avatar for sidatra79
0
262
Member Avatar for tatainti55

To run your program for a specific amout of time, you are correct you will need threading. Once you understand threading, you may want to have a look at the ctime header [url]http://www.cplusplus.com/reference/clibrary/ctime/[/url] This will provide a method of checking how long the program has been running, you would set …

Member Avatar for Freaky_Chris
0
74
Member Avatar for c230jif

If you want to use getline() then strtok() would work perfectly for you. To split the line of text into indervidual words Chris

Member Avatar for Freaky_Chris
0
111
Member Avatar for STUDENT#101
Member Avatar for AceofSpades19
0
150
Member Avatar for san_sarangkar

Actually it can turn into a game, there a ae many different arrangements of cells in the game of life, which have different names, sch as glider -- these will move in 1 direction continually untill another live cell interupts this. Many appterns can be created to do many differents …

Member Avatar for Freaky_Chris
0
195
Member Avatar for lomo

It has already been pointed out to you. [ICODE]if (genArray[i] == "ACG")[/ICODE] This will not work, your are comparing a char* with a string. As it has already been pointed out. I'll just restate the fact you need to check character by character [CODE=C++]if (genArray[i] == "A"){ if (genArray[i+1] == …

Member Avatar for lomo
0
253
Member Avatar for andypuddin

Realtek may be able to help you out. They have drivers compatiable with ALOT of sound cards

Member Avatar for Freaky_Chris
0
275
Member Avatar for roystons

Check you don't have any extra programs trying to launch on boot that you do not want and may be causing this. Just check.. Start->Run->msconfig

Member Avatar for Freaky_Chris
0
229
Member Avatar for sudharsannr

Scan your pc using any half decent spyware removal tool / ad-ware removal tool. If it cannot fix it, then it will more than likely tell you which file it is embedded in so just find it and delete it yourself. BTW post in the correct forum please.

Member Avatar for Freaky_Chris
0
81
Member Avatar for DogfoodEnforcer

Doing it a long hard way here is a brief explanation. If you have a integer input then you first need to split it into indervidual numbers i.e 11010111 would become 1 1 0 1 0 1 1 1 (spaces show a split into an array or whatever) Then you …

Member Avatar for Freaky_Chris
0
180
Member Avatar for laghaterohan

You have to create a date object from the text box text before you can compare it to another date object I believe not a VB.NET programmer :/

Member Avatar for laghaterohan
0
1K
Member Avatar for mruane

[CODE=Python]# adding to christ o'leary's fight function # to have integer returned use # x = random.choice([0, 1]) # print x, type(x) # testing # or x = random.randrange(0, 2) # print x, type(x) import random def main(): global monster_HP1 monster_HP1 = 5 global hp hp = 10 print """you …

Member Avatar for Gribouillis
0
189
Member Avatar for mfowler31

This sound to me like it is your Anti Virus, anti virsus software has been known to corrupt and drop alot of incoming packets. After disabling / uninstalling your anti virus, you may need to restore one specific file on your PC this can be done but i cannot remember …

Member Avatar for Frank Wallis
0
188
Member Avatar for rrreeefff

You are still trying to print out the value of a before you have retrieved its value from the user via scanf()

Member Avatar for rrreeefff
0
155
Member Avatar for aiglesky1

You will need to install all the drivers listed on the [URL=http://h10025.www1.hp.com/ewfrf/wc/softwareList?os=228&lc=en&cc=us&dlc=en&product=1842155]manufacturers site[/URL]

Member Avatar for aiglesky1
0
102
Member Avatar for qwerty_ytrewq
Member Avatar for Ezzaral
0
127
Member Avatar for ishitac

A quick google turn up what look to be a nice [URL=http://www.javaworld.com/javaworld/jw-03-1999/jw-03-dragndrop.html]page[/URL] Google is your friend, also if you don't know java to well i would recommend getting to know it a bit better first Chris

Member Avatar for Ezzaral
0
262
Member Avatar for osirus0830

[CODE=C++]#include <iostream> using namespace std; const int Months = 12; const int Years = 3; int main(){ const char * months[Months]={"Jan", "Feb", "Mar", "Apr", "May", "June", "July", "Aug", "Sept", "Oct", "Nov", "Dec"}; int temp = 0; int sales[Years][Months]; cout << "Enter the sales data for each month during 2005-2007.\n"; for …

Member Avatar for Freaky_Chris
0
80
Member Avatar for terencemadzima

Have you tried booting in safe mode, that might allow yuo to login in correctly then delete any files that may be cause the problem

Member Avatar for zeroth
0
93
Member Avatar for EmilyJames

[QUOTE=carlcarman;701690]Make sure you have at least 2GB of ram.3 GB or more makes it run smooth[/QUOTE] this is True, i am running a 3gb RAM vista box, bost of the time at least 40-50% of my RAM is in use just to allow vista to run. So anything less than …

Member Avatar for Freaky_Chris
0
141
Member Avatar for Kawasaki8

Do you have this problem whilst your are completely disconected from the internet? Sometimes download trojans and things can cause this, if you find that being disconnected from your internet solves this then you may be ok. The other problem may be your graphics card, if you have a faulty …

Member Avatar for Freaky_Chris
0
183
Member Avatar for paferlini

[QUOTE=jlm699]This depends on the type of system you're on. \r\n is Windows, \n is Linux, and I believe that \r is Mac (although I've never used one so I don't really know). [/QUOTE] Yer thats the correct line endings for each different OS, and if you intend to have it …

Member Avatar for jice
0
92
Member Avatar for Briz

The reason your code got shifted to the left was because you didn't use code tags, another thing pointed out in posting guide lines

Member Avatar for Freaky_Chris
0
194

The End.