15,300 Posted Topics
Re: [URL="http://www.google.com/search?hl=en&q=f15"]F15 ?[/URL] | |
Re: >> Do While rate <= 0.1 You have to set [b]rate[/b] to value of 0.05 before the above line. The way you have it now that variable just contains any old random value which might or might not be less than 0.01. Just before the end of that loop you … | |
Re: No one can tell you a thing without knowing what program language you are using, what compiler, and what operating system. Then we will move this thread to the approproiate board. It doesn't belong here in the lounge -- support questions are not allowed here. | |
Re: Learn C++ first. >>My goal is to learn how to program, not to memorize syntax. Sorry to burst your bubble but at first that is exactly what you will be doing. >>I am a Mac OS X user and prefer learning a language on OS X Nothing wrong with that … | |
Re: >> need to know what I need to start my first server ... A computer with a monitor and a keyboard -- Oh yea, you'll also need a building to put it in and some electricity to run it. A [b]server[/b] can also be a waiter in a resturant. So … | |
Re: Didn't you [URL="http://www.microsoft.com/learning/mcp/mcse/default.mspx"]read this[/URL] ? | |
Re: assuming [b]answer[/b] is a string [code] bool result; if( answer == "YES" ) result = true; else result = false; [/code] | |
Re: When you exchange one array during the sort you have to make similar exchanges in the second array. That's one reason that many (most?) programmers put suich things in an array of structures -- to make sorting a lot simpler. [code] struct data { int a; int b; }; [/code] … | |
Re: Impossible to answer that question. There are probably billions of Fortran programs and each one would be a unique port. In many cases porting may not even be possible depending on the mathametical complexities of the fortran program. VB does not have the efficient mathametical functions that are available to … | |
Re: why don't you format the string and then send it to sybase. The code below won't be 100% correct because it does not account for the floats and integers. The main thing is that you have to surround all strings with quotes, and nothing for floats/integers. You can not pass … | |
Re: put the longest string in strarray[0], the shortest in strarray[1] and the third string in strarray[2]. Then you can easily print each of the three strings in order they appear in that array. How do you find out which string is the longest? Here is an example [code] std::string shortest, … | |
Re: line 6: if you can enter 1-10 characters then that array isn't big enough -- need to make it size of 11 to hold the string null terminating character. line 9: does your assignment require you to use dynamic memory allocation? If not, why are you using pointers ? line … | |
Re: Q1: put the strings in an array and then sort them. [code] #include <vector> #include <string> #include <algorithm> <snip> std::vector<std::string> strarray[3]; <snip> std::sort(strarray.begin(), strarray.end()); [/code] Q2: Open and close brackets are incorrect. [code] if (ch = 32) { cout << space << endl; } [/code] | |
Re: So what is the problem with that? What is the query you used to get the resultset ? Did your query ask for a column named [b]contact[/b] ? | |
| |
Re: >>I think this will be possible in the next version of C++ You can do that now [code] struct CandyBar { public: CandyBar (const char* brnd, float wt, int calors) : brand(brnd), weight(wt), calories(calors) { } string brand; float weight; int calories; }; int main() { CandyBar Bars("Violent Crumple", 20.5, … | |
Re: >>long int r = random(srandom ( (unsigned) x));int x = 27; No No NO. You can not do that. The intent of srandom() is just like the standard C library function srand(), which is to be called only once during the lifetime of the program. After that random() can be … | |
Re: >>is that possible? Yes -- you must create additional thread(s) for the loops. There have been lots of threads here at DaniWeb and all over the net about that topic. Seek and thou shalt find :) | |
Re: >>can any1 here please write a code for me please???? Yes -- deposite $100,000.00 in my paypal account and I will do it for you. But someone else already did this assignment for you. Just read your other thread. | |
Re: Post your questions and someone will try to help you. Several of the regulars here are fluent in assembly and other languages. | |
Re: want to count upper case 'A' and lower case 'a' separately or as a single character? I would create an int array of 256 to represent all the possible characters in a text file. Actually that's more than is possible in a text file, but it makes the math easier. … | |
Re: >>Any other ideas why? Most likely crased because you didn't change "%.3lf" to "%d" everyplace. If you did that then you have to post the code again | |
Re: Ok you guys screwed up I guess because of all the respoinses in this thread I can't delete it as spam. | |
Re: Use an icon editor to create the icon then windows explorer to change the program's icon. Or [URL="http://www.google.com/search?hl=en&q=how+to+change+programs+icon&btnG=Search"]these[/URL] links | |
Re: If you are writing a console program then see [URL="http://msdn2.microsoft.com/en-us/library/ms682073.aspx"]these console functions[/URL]. Not immediately sure which one(s) you need to use. You might also look through some of [URL="http://www.codexxi.com/index.html"]these links[/URL] | |
Re: Welcom to DaniWeb. If you want to talk politics you will get lots of responses in our Geek's Lounge. I don't know how IT can help you with that but please feel free to ask your questions. | |
Re: what programming language are you using ? Geek's Lounge is not the right place to ask that question, but we need to know how you want to go about doing that in order for us to move this to the correct board. | |
Re: Its not in the makefile, but a difference in the code. Post the function header in the lib. the prototype in the header file (if you have one), and in the function call in the application program. Could be something as simple as [b]const[/b] in one and not in the … | |
Re: You can start by reading some of the [b]Read Me[/b] threads at the top of this forum. They contain a wealth of information about books to buy and etc. | |
Re: You will want to learn ODBC and SQL languages. ODBC is an old way to access modern databases, while SQL is the language used by most databases such as Access. But don't use Access in a web environment because its only good for a couple people at a time. Its … | |
Re: lets say you have a base class called Animal and two derived classes called Dog and Cat. Casting a pointer of type Animal to Dog is unsafe because that might actually be type Cat. If there is something about Animal that will tell you whether it is a Dog or … | |
Re: I posted an example just a few minutes ago in [URL="http://www.daniweb.com/forums/thread118341.html"]this thread[/URL]. >>My point is i can achive the same by c style casting too... Just change from [icode]static_cast<char*>(obj)[/icode] // c++ style case to [icode](char *)obj;[/icode] // c style case | |
Re: >> don't want use langage VC++ VC++ is NOT a language but is a compiler produced by Microsoft. Don't confuse VC++ (the compiler) with C++ (the language). And yes you can do network programming with Microsoft VC++ compiler as well as most other compilers. Look at [URL="http://www.google.com/search?hl=en&q=c%2B%2B+network+programs"]these google links [/URL]for … | |
Re: Welcome to DaniWeb. Your use of the milspelled word [b]enuf[/b] got me to searching the internet to see if it was really a correct spelling. Came across [URL="http://www.usatoday.com/news/nation/2004-06-02-spelling-protest_x.htm"]this article[/URL] from about four years ago [quote]Carrying signs reading "I'm thru with through," "Spelling shuud be lojical," and "Spell different difrent," the … | |
Re: just specifiy the full path along with the filename, like this. Notice that you have to have two \\ as folder separators. [icode]ofstream out("c:\\mypath\\file.txt");[/icode] | |
Re: This is how I would do it, but there might be other ways. [code] int main() { int ***arry; int f = 2, s = 3, v = 5; arry = new int**[f]; for(int i = 0; i < f; i++) { arry[i] = new int*[s]; for(int j = 0; … | |
Re: They all look valid function calls to me. But can't be sure because we don't have the function prototype for Test(). | |
Re: line 21: All that does is declare an array. Yet on line 27 you are attempting to sort it. Where are you copying the values of array1 into the array that was declared on line 21? Also, you can't declare an array like that because [b]count[/b] needs to be a … | |
Re: look at boost libraries and see if it has something useful in its math libraries. Or maybe mathlib has what you want. | |
Re: [URL="http://www.daniweb.com/code/coder46588.html"]some more examples[/URL] for MS-Windows and *nix | |
Re: >>cout<<"Total price is= "<<(1500*12)+20000="; remove the quote just before the semicolon. same problem on all the other lines in the 1st program | |
Re: Point is not a POD (plain old data) type so you must either create overload << operator for it too or print each part separately [code] struct Point { int x, y; }; ... ostream & operator << (ostream &output, Edge &e) { Point p1, p2; p1 = e.getP1(); p2 … | |
Re: you can't use VC++ on Fedora because VC++ only runs on MS-Windows. I have not used gdb in years but it should be able to handle a multi-file program with ease. | |
Re: >>I work in Visual C++ 6. Bad, bad thing to use. Get into the 21st century and upgrade to VC++ 2008. Then you can do it [URL="http://support.microsoft.com/kb/316207"]like this[/URL]: But if you can't do that then [URL="http://www.codeguru.com/cpp/misc/misc/article.php/c6091/"]here's a tutorial[/URL] -- but be prepared for some very complex programming. | |
Re: [code] string ary[] = {"string1","string2" ...} int n = sizeof(ary) / sizeof(ary[0]); // number of strings srand(time(0)); int x = rand() % n; cout << ary[x] << "\n"; [/code] | |
Re: why did you change main() ? All you had to do was write the [b]increment()[/b] functions. Just delete the crap you wrote and start again. This time only change line 6 where it says to [quote]put increment function here?[/quote]. DO NOTHING MORE other than correct lines 1 and 2 to … | |
Re: Calling database/ODBC functions to get or update data for the browsers is a pain in C or C++. But it can be done. | |
Re: move srand() above outside that loop. It should be executed only once during the lifetime of the program. And the parameter should be time(0) so that it is different every time you run the program. Like this: [icode]srand( time(0) );[/icode]. Some compilers might want you to typecase 0 to unsigned … | |
Re: use a loop [code] string word = "Hello"; for(int i = 1; i < word.length(); i++) word[i] = '*'; [/code] | |
Re: >>if it is possible to ensure that my hook is always highest No. |
The End.