15,300 Posted Topics

Member Avatar for vegaseat
Member Avatar for jwenting
1
1K
Member Avatar for leroi green

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

Member Avatar for leroi green
0
135
Member Avatar for ICER1

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.

Member Avatar for ICER1
0
129
Member Avatar for RyanLeaf

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 …

Member Avatar for Ancient Dragon
-1
500
Member Avatar for Vic842

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

Member Avatar for jwenting
0
129
Member Avatar for theoabhishek
Re: MCSE

Didn't you [URL="http://www.microsoft.com/learning/mcp/mcse/default.mspx"]read this[/URL] ?

Member Avatar for coolraj003
0
156
Member Avatar for jennyebrooke

assuming [b]answer[/b] is a string [code] bool result; if( answer == "YES" ) result = true; else result = false; [/code]

Member Avatar for jennyebrooke
0
182
Member Avatar for nurulshidanoni

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

Member Avatar for nurulshidanoni
0
89
Member Avatar for pratap89

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 …

Member Avatar for Ancient Dragon
0
94
Member Avatar for digiman

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 …

Member Avatar for Ancient Dragon
0
143
Member Avatar for WilliamBaxter

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

Member Avatar for Ancient Dragon
-1
130
Member Avatar for Lensva

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 …

Member Avatar for Ancient Dragon
0
95
Member Avatar for blaec

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]

Member Avatar for blaec
0
209
Member Avatar for gbc417

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

Member Avatar for boblarson
0
69
Member Avatar for Ancient Dragon

This is the second time in about the last 5 minutes I have seen this

Member Avatar for The Dude
0
47
Member Avatar for cobberas

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

Member Avatar for vmanes
0
238
Member Avatar for Suraine

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

Member Avatar for Suraine
0
253
Member Avatar for Suraine

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

Member Avatar for Suraine
0
104
Member Avatar for WilliamBaxter

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

Member Avatar for Ancient Dragon
0
70
Member Avatar for Hax01

Post your questions and someone will try to help you. Several of the regulars here are fluent in assembly and other languages.

Member Avatar for Hax01
0
39
Member Avatar for coolbreeze

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

Member Avatar for Ancient Dragon
0
203
Member Avatar for electromania

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

Member Avatar for electromania
0
86
Member Avatar for Neeraj Sharma

Ok you guys screwed up I guess because of all the respoinses in this thread I can't delete it as spam.

Member Avatar for Ancient Dragon
-1
107
Member Avatar for Black Magic

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

Member Avatar for Black Magic
0
101
Member Avatar for CodeBoy101

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]

Member Avatar for CodeBoy101
0
351
Member Avatar for Tomoney

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.

Member Avatar for Tomoney
0
163
Member Avatar for bostonjeepguy

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.

Member Avatar for EMT147297
0
110
Member Avatar for sjcomp

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 …

Member Avatar for sjcomp
0
111
Member Avatar for Vic842

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.

Member Avatar for Vic842
0
172
Member Avatar for Lance_Wassing

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 …

Member Avatar for Lance_Wassing
0
122
Member Avatar for c_plus_plus_for

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 …

Member Avatar for Ancient Dragon
0
308
Member Avatar for tlly

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

Member Avatar for Ancient Dragon
0
358
Member Avatar for zest

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

Member Avatar for Ancient Dragon
0
97
Member Avatar for zekeabrams

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 …

Member Avatar for Tomoney
0
161
Member Avatar for DOPY

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]

Member Avatar for DOPY
0
258
Member Avatar for prushik

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

Member Avatar for dougy83
0
89
Member Avatar for Monte

They all look valid function calls to me. But can't be sure because we don't have the function prototype for Test().

Member Avatar for Ancient Dragon
0
116
Member Avatar for CNSK207

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 …

Member Avatar for vmanes
0
117
Member Avatar for skatamatic
Re: Pi !

look at boost libraries and see if it has something useful in its math libraries. Or maybe mathlib has what you want.

Member Avatar for skatamatic
0
147
Member Avatar for tootypegs

[URL="http://www.daniweb.com/code/coder46588.html"]some more examples[/URL] for MS-Windows and *nix

Member Avatar for tootypegs
0
112
Member Avatar for computer engW

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

Member Avatar for Black Magic
0
107
Member Avatar for daviddoria

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 …

Member Avatar for daviddoria
0
134
Member Avatar for ahjiefreak

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.

Member Avatar for ahjiefreak
0
245
Member Avatar for heav_yduty

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

Member Avatar for heav_yduty
0
84
Member Avatar for Black Magic

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

Member Avatar for Ancient Dragon
0
81
Member Avatar for allialli

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 …

Member Avatar for bugmenot
0
246
Member Avatar for Spaiz

Calling database/ODBC functions to get or update data for the browsers is a pain in C or C++. But it can be done.

Member Avatar for jephthah
0
58
Member Avatar for Suraine

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 …

Member Avatar for vmanes
0
84
Member Avatar for veronicak5678

use a loop [code] string word = "Hello"; for(int i = 1; i < word.length(); i++) word[i] = '*'; [/code]

Member Avatar for veronicak5678
0
185
Member Avatar for inamabilis
Member Avatar for inamabilis
0
78

The End.