2,827 Posted Topics
Re: Here's an interesting rebuttal. [url]http://warp.povusers.org/OpenLetters/ResponseToTorvalds.html[/url] | |
Re: [QUOTE=qk00001;1074761]Hi people, Do you have any good sites for C++ MySQL.Especially how the 'query' part works in the C++. Thanks a lot!!![/QUOTE] There's MySQL, there's C++, and there's how to use MySQL from C++. I've used MySQL++ as a wrapper successfully to do this, but that was a while ago, … | |
Re: These threads might be useful. [url]http://www.daniweb.com/forums/thread184830.html[/url] [url]http://www.cplusplus.com/reference/clibrary/cmath/floor/[/url] [url]http://www.cplusplus.com/reference/clibrary/cmath/pow/[/url] To round down to the lower tenth, multiply the decimal part by 10, take the floor, then divide by 10. 5.6789 // original number. .6789 // decimal part. 6.789 // decimal part times 10 6.0 // floor it 0.6 // divide by … | |
Re: The spec doesn't say anything about making an "array list". It says to make an array. [code=text] Make sure that you create an array called myClass. [/code] Java has plain old arrays and it has Collections, one of which is an ArrayList. [url]http://www.j2ee.me/javase/6/docs/api/java/util/ArrayList.html[/url] Find out for sure whether you are … | |
Re: [QUOTE=UberJoker;1067773] point 2)what the heck ?....this is probably the worst piece of code iv come across in years. [/QUOTE] [QUOTE=UberJoker;1067773] If you are not the writer of the code I would advise you to go through the changes iv made. But anyway. I fixed it. Hope it helps. [/QUOTE] UberJoker, … | |
Re: Can't test it since you haven't provided the input file. My best advice for now is that you need to make sure you're reading in the data in the first place. It looks like the first thing read in on line 114 is the first date, which you say is … | |
Re: Code tags: [noparse] [code] // code goes here [/code] [/noparse] So ARRAY_SIZE is 25? 26? Is it defined somewhere? It's not listed here, and a lot of other stuff isn't listed either, so it's impossible to run and it's hard to see what's going on. We also don't know what … | |
Re: Line 72: [code] while((t!=9&&w==0)&&((t!=9)||((w==0)))); [/code] Even if it is correct, it definitely looks overly complex. Maybe this? [code] while (t < 9 && w == 0); [/code] w == 0 means no winner yet, right? t is the number of moves so far, right? It has to be less than … | |
I have a bunch of my old hard drives with Windows and Linux installations on them. They are from a variety of machines, some still in existence, some not. I want to go through them, copy the files I want, to another drive, then reformat the old drives. I've been … | |
Re: The posts got messed up somehow so you have some truncated code, two triangle.h files, and no virtual.cpp function. Please repost using code tags http://www.cplusplus.com/doc/tutorial/polymorphism/ This link has some decent examples of polymorphism and virtual functions. Code from link is pasted below. // virtual members #include <iostream> using namespace std; … | |
I have a monitor (ViewSonic VA1912wb) that has a resolution of 1440 x 900 pixels and everything looks great at that resolution. After installing a wireless keyboard and a KVM switch, I am no longer offered that resolution as an option in the Control Panel. Since I know everything looks … | |
Re: [QUOTE=mrPaul;1055325]Forgive me if im wrong but wouldn't this be a hell of a lot easier in an array? string itemsArray[x][y] itemsArray["pen"][1.99] or something to this effect? without writing some code to parse your alphanumeric string you're going to struggle how your doing it right now i think (imo)[/QUOTE] That's an … | |
Re: [QUOTE=maverick405;1054607]Thanks for the help, but what i did is bit different form you, please have a check, the code is below, it runs fine but, though i am new to C++ just to have an opinion that I am doing right stuff or not? [CODE]#include <cstdlib> #include <iostream> using namespace … | |
Re: Lines 15 - 24 - This loop is a black hole. Once you get to line 23 the first time, if you get to it, you'll never get out. Well, you'll get out when you go through it MAX_SIZE times, so that's a slight exaggeration, but you won't get out … | |
Re: [QUOTE=Mafia619;985152] but the necessary out put does not come.........[/QUOTE] Of course the necessary output doesn't come. You didn't expect it to, did you? You have no algorithm to test for/calculate prime numbers. There are a lot of ways to do this. firstPerson listed one way. If you don't have any … | |
Just tried to do a cut-and-paste of some C++ code. It renders fine on the forum page, but when you "Toggle Plain Text" to paste it into another document, you get some tags you don't want ('<strong class="highlight">'). [code=text] std::istream& <strong class="highlight">operator</strong><<(std::istream& FX,complex& A) { A.read(FX); return FX; } std::ostream& … | |
Re: [QUOTE=mallak alrooh;1054587]write aprogramto generate a business travel express attaachment for an income tax return. The program should request ias input the name of the organization visited, the date and location of the visit,and the expenses for meals and entertainment,airplane fare,loding,and taxi fares.(Only 50% of the expenses for meals and entertainment … | |
Re: [QUOTE=maverick405;1053563]Why do we use this? Voila! Syntax-highlighting![/QUOTE] "Voila! Syntax-highlighting!" isn't part of the code tag. niek_e is just excited by the power of code tags and decided to spread the enthusiasm. Feel free to replace "Voila! Syntax-highlighting!" with :cool::cool::cool: | |
Re: You need a way to tell whether a string is a number or not. Define exactly what a "number" is (negatives, decimals, commas, just digits, etc.), then you can write a function to test a string. If you are only using integers, you can use the atoi function. If it … | |
Re: [QUOTE=sfuo;1052137]I don't know anyone and haven't seen any posts where people make their own namespace.[/QUOTE] You need to meet more C++ programmers then. Custom namespaces are all over the place, for good reason. I just debugged my own (very short) project. The culprit? I had several functions called "GetSQLCommand" and … | |
Re: [QUOTE=jinjishu;1051994]I decided to give myself a break before continuing. I am looking at this now and realizing I didn't think this through. I thought I would add a counter to the if statement in my stub to keep track of the i and u counters. I realized this was a … | |
Re: Frame and Panel are Java classes. You may want to rename your classes to make it less confusing, or at least be careful and make sure you don't get them mixed up. What do you want to have done when the button is pressed? In other words, how are you … | |
Re: Stringstreams will work wonders here. Let the >> and << operators do all the parsing and type changing work for you. [url]http://www.cplusplus.com/reference/iostream/stringstream/[/url] | |
Re: You can't delete your account, you can't delete your posts, you can't prevent Bob from posting, you can't control Bob's opinion, and you can't control Bob from PMing you. You CAN block Bob so whatever PM he sends you doesn't get through, you CAN ignore Bob, you CAN respond to … | |
Re: You have number declared as an integer, but you are treating it as a string. There is no "int" class, so you cannot use the dot operator as you do in line 17. Use an if statement instead of the switch statement on line 17: [code] if (number >= 0 … | |
Re: According to Ark M in this thread, if you want microseconds, you need something OS-specific. [url]http://www.daniweb.com/forums/thread134643.html[/url] Ancient Dragon's idea in this thread is to do something a million times, time it in seconds using the standard C functions, then divide by a million. Depending on what you need, that may … | |
Re: Yes, many here can solve it. But you need to show your attempt and ask a specific question. If you do, many people will be happy to help. [url]http://www.daniweb.com/forums/announcement9-2.html[/url] | |
Re: [QUOTE=SgtMe;1047061]Thanks! Works now. Well I say works... It just loads, puts green background - how I want - but then multicoloured lines flash round the edge of the screen - not what I want. I'll have another look at the code later...[/QUOTE] Whatever the problem is, it's not nick's code, … | |
Re: There are two separate terms to think about: "size" and "capacity". "capacity" is the storage allotted to the array. "size" is the number of elements in the array THAT YOU CARE ABOUT. The main rule is this: "size" must always be less than or equal to "capacity". Say I want … | |
Re: Add this to your Header.cpp file: [code] List::~List() { } [/code] or delete this line in Header.h: [code] ~List(); [/code] You have a List destructor declared but not implemented, so it's calling it, but not finding it. | |
Re: [QUOTE=anurag814;1046992]i want to know the programming code which converts roman numerals to integer numerals.[/QUOTE] It's a very common assignment, so if you google it, you'll probably find the code. But if you want help HERE, you need to show an attempt. [url]http://www.daniweb.com/forums/announcement8-2.html[/url] | |
Re: Why would you start a thread in the Geek's Lounge and then say this? I mean what's the point of starting a thread if you don't want other peoples' opinions? [QUOTE=Bob_180_Bob;1040287] I have my thoughts so I am not interested in what you think[/QUOTE] | |
Re: Lines 26 - 29: Why would you want the return value of printf? From [url]http://www.cplusplus.com[/url] page on printf: [quote] Return Value On success, the total number of characters written is returned. On failure, a negative number is returned. [/quote] Is that what you want? I seriously doubt it. Lines 19 … | |
Re: nextInt (int) requires a positive parameter. You are passing it arr[0], which is 0, which is an error. From the documentation: [url]http://java.sun.com/javase/6/docs/api/index.html?java/util/Random.html[/url] [code] public int nextInt(int n) { [COLOR="Red"] if (n <= 0) throw new IllegalArgumentException("n must be positive"); [/COLOR] if ((n & -n) == n) // i.e., n is … | |
Re: Go through the word character by character and change each character to upper or lower case using toupper or tolower from cctype. There is no toupper or tolower function that takes a string as a parameter and converts the whole string. I'm sure many people have written one, but it's … | |
Re: Post what the figures should look like. Are we talking about this? And you can't get the last two? Clear: [code=text] ***** * * * * * * *****[/code] Filled: [code=text] ***** ***** ***** ***** ***** [/code] Horiz. Lines: [code=text] ***** *****[/code] Vertical Lines [code=text] * * * * * … | |
Re: [QUOTE=Zay;1040710]hello ; here is a quastion . i understand it until the red senence , i do not know what dose it mean mathematically ? Write a program that prompts the user to input a positive integer. It should then output indicating whether the number is a prime. Note: an … | |
Re: > perhaps you misread what I put. I was saying to whom ever was willing to lend me a hand if they were to put any code in to explain why its that way, etc. But thanks for assuming! Please use code tags. void getScore(double s1, double s2, double s3, … | |
Re: [QUOTE=GrimJack;1034732]The bleach could not reach my brain through my eyes - I could not stop clicking. Please, I beg you do not [URL="http://www.peopleofwalmart.com"]click[/URL]! It has been 2 hours, my eyes are empty pools, yet I still click [B][I][U]next[/U][/I][/B][/QUOTE] Don't fight it. Just give in to the temptation, set aside three … | |
Re: [QUOTE=power_computer;1039640]I am not a first time posted here dragon, obviously. However, I dont expect you to remember my skill set. I know how to open a file, read from a file, read into a struct array, class array etc. Ive never used a dynamic array which shouldnt be too hard, … | |
Re: Looks fine to me. You need to get the error message. Does it work when you run it on a local machine? Try putting Main2.class and the html page in the same folder on your local hard drive and double-clicking on the html file to open a browser. See if … | |
Re: [QUOTE=Phil++;1042915]Hey there, wonder if you can help me.. I have three classes: 1. Person 2. Accounts 3. Purchases (Accounts and Purchases both inherit from Person) You don't need an account to make a purchase but if you do you'll enter your: name, address etc.. The problem I'm having is association. … | |
Re: [QUOTE=cwarn23;1035120]Yes however I use to use code tags with no syntax a lot for non-code text and now old posts like the many I've posted are highlighted in code when they are just important text. There are ways around it but as good as this new feature is for new … | |
Re: [QUOTE=ranjithgoud;1036395]hi guys, i am ranjith intrested in writing c c++ progs i hav a doubt that can i write a c or c++ program to excute at a given time thanks[/QUOTE] You're going to have to clarify. Do you have some executable program, originally written in C++, that you want … | |
Re: Let's look at your polynomial class. For now, I'm ignoring the Linked List part: [code=C++] class poly{ public: poly(); poly(int); void setCoef(int exp, double coef); void print(); private: int size; Lnode *head, *tail; }; [/code] Ignoring the linked list pointers you have one data member: size. How can one represent … | |
Re: [QUOTE=samsons17;1041278]how to display this using for loop ? ***** ***** ***** * * ***** * * ***** ***** thank you for helping.[/QUOTE] Code tags. We don't know what you're trying to do without them: [code=plain] ***** ***** ***** * * ***** * * ***** ***** [/code] And we can't tell … | |
Re: One, you should know how to use code tags by now. Use them. Read the pinned threads. Two, you already have a thread on this. Shall we answer here or there? Three, what's the question? What are you trying to draw? You have code, but no explanation and no statement … | |
Re: [QUOTE=sebassn;1041048]Ok, you say that I must get rid off the (endls), but as I do that I get only a line with 4 stars, with them on the code, I get 4 lines with a star in each line. Is just that I don't exactly know what to put in … | |
Re: Code tags and formatting please. The code is unreadable now as it is. Before you can work on the borrowing function, you need to set up your ArrayLists correctly. > There should be classes describing customers and videos and also a class called VideoStore that > contains ArrayLists of customers … | |
Re: [code] // outline // #include statements here // #define statements here // global variables here // function declarations here int main (int argc, char* argv[]) { // variables local to main () // more code return 0; } // functions go here [/code] This is a vague skeleton. You're going … |
The End.