135 Posted Topics
Re: Welcome to DaniWeb, ajay2. By the way, you've posted this in the C forum, under Software Development, where people ask questions related to the C programming language. You may be interested in the Community Introductions forum under Community Centre, where introductions are usually made. Enjoy your stay, and I hope … | |
| |
Re: > Can somebody help me with this? > I dont know where to start from. And comments as well for explanations. Start by declaring three structs to store Athlete, Event and Registration details. The struct definitions are given in Appendix 1. Are you able to do this part of the … | |
Re: Can you post your code, so that we can take a look at it? Thanks. | |
Re: Congratulations on having working code for solutions (a) and (b). If you take a look at what's happening with (c) you'll probably realise that for each line printed the number of spaces is incremented and the number of asterisks decremented. In (d) it's the opposite: for each line the number … | |
Re: It's traditional to have a go at a problem yourself first, then ask for help with specific parts if you need it. What is it you're having trouble with, exactly? Do you know what's expected from you for a project proposal? Are you comfortable with your understanding of traffic light … | |
Re: Consider the algorithm you need to apply to achieve this. Express the steps in natural language first, to get it straight in your mind. When you think you have that sorted, try coding the steps. If you can't get your code to work, post it here. You know you need … | |
Re: In any programme of sufficient size and complexity you're likely to have a large number of functions. Quite often an organisation's coding standards provide guidelines on the length of functions, limiting their size. For example you might have a 60-line limit as a guide. It's quite normal to have lots … | |
Re: I would have to politely disagree with phorce. Bubblesort would change the indexes of the elements which would prevent you from returning the index of the smallest value (a requirement). I'm making an assumption about the type of solution expected here, given the way your problem is worded. If you … | |
Re: HacruLeian, are you still looking for help with this problem, or is it now too late (or solved)? If you're still looking for help, where are you at with it? | |
Re: As others have noted, you're attempting to store a string in a single character, so that needs addressing first. Once you have your input string, you'll want to compare it with the correct password, which I assume will also be a string (given the simplicity of your program). Rather than … | |
Re: It's good that you found something that worked. However, you may be interested in finding out more about escape sequences, which allow you to use: uArray[2] = '''; // single quote + backslash + single quote + single quote There are others, besides this one for the single quotation mark, … | |
Re: To delete a file use the C++ remove() function. | |
Re: [quote="cscgal"]sorry, I'm CONFUSED!! You say you want to install SVGA drivers but you only have standard VGA right now installed? Isn't that the same thing? SVGA = Standard VGA??[/quote] Isn't SVGA = Super VGA? | |
Re: [quote="cscgal"]You might find this a bit silly, but could someone please explain to me how to do C++ templates? I know they're very simple ... I just never learned them nor ever had a teacher who taught them or even made mention of them.[/quote] This is an old thread but … | |
Re: Using #define in this way, CELSIUS is a symbolic constant. Everywhere that CELSIUS appears in this source file it is replaced with 20, simple text substitution. So the following line: for (CELSIUS = LOWER; CELSIUS <= UPPER; CELSIUS = CELSIUS + STEP) becomes for (20 = LOWER; 20 <= UPPER; … | |
Re: [quote="fakespike"]knowledge is power[/quote] I think this is where you start to go wrong. Someone has knowledge, knowledge is power, power can be abused .... You're trying too hard. Not all knowledge can be used as a form of power. Not all power can be abused in a meaningful way. ![]() | |
Re: One easy way to achieve this would be as follows: - Start with your array of 40 questions (strings). - Initialise a counter to the number of strings (40) - Select a random string in the range 1 to 40 (e.g. string 10) - Swap the selected string (10) with … | |
Re: Sounds like a good idea, but nothing tooooooo heavy, I hope ;-) | |
Re: > i need c++ program source coding for payroll using multiple inheritance nvijay, your request is unrelated to this thread and would be best served by starting a new thread. Be advised, though, that we're not in the business of writing someone's source code for them. If you have source … | |
Re: What format is the original data in, that you want written to the file? Your hex editor happens to display the stored value in hex format when it reads it. You might equally display it in decimal, or ASCII, or in some other format. It's not stored as 'hex'. | |
Re: Your C++ compiler comes with a random number generator, rand(). There's a tutorial on the site here: [thread]1769[/thread] If you're producing a serious application you'll want something a little more sophisticated but for many purposes it's adequate. | |
Re: In something like the following, you'd want to write your code in such a way as to avoid buffer overflow. The user prompt itself won't be enough: [code] char* Input::name(){ // get the product name char *name; name = new char[20]; if (flag_) cout << " Product name (max 20 … | |
Re: You're sure it wasn't a special offer, free pair of boots with every monitor? [groan, sorry!] | |
Re: It comes bundled with my PC. I don't have anywhere near as many problems as people tell me I should have with it. I have loads of software for it because I've been using it for some years. If Windows gave me real problems I might consider changing OS but … | |
Re: [quote="evilmonkey29"]I was about to format when I was given the option to "Repair a Windows Installation". I did that and it works now. All of my files are untouched, my programs are still installed. Microsoft's coolness has just gone up.[/quote] Sssssssshhhhhhhhhhhh!! People have made careers out of bashing Microsoft. ;-) | |
Re: Dani has already provided the basis of a solution. I think it's equally as important to understand *how* you come up with a solution to problems such as this. You need an approach to problem solving. There's no rocket science involved; you simply need to go through your problem statement, … | |
Re: I don't know about tutorials for C++ programmers learning C, mostly they're the other way around. If you're already fairly comfortable with C++ just go for a straight C tutorial and you should do just fine. Do keep in mind that C has changed in recent years. The C standard … | |
Re: It's a little while since I read any books on Flash so I'm not up to date with MX, but certainly for Flash 5 up until about a year ago Friends of Ed did a whole range of books that were well thought of, for beginners and upwards. I imagine … | |
| |
Re: [quote="root"]Stuff you Dislike: Ignorant, unopen minded people..[/quote] I think the word you're looking for is "closed" ;-) | |
Re: [QUOTE=fishman]I need to pass the whole array of objects to a function where I can play with the attribute values or change them if necessary. I have been playing with pointers and references but can not get them to work with an array of objects like I have.[/QUOTE] Just pass … | |
Re: Hi, don't worry, it's not laughable, we've all been equally as stumped with problems equally as simple once upon a time. Having calculated which position the median is at, you then reopen the file, read in the first value from the file, and output this as the median. The first … | |
Re: [quote="fastcarz3"]can anyone come up with a solution for this ? real quick for me? If anyone could this for me thanks.[/quote] That's the second piece of homework you've posted here asking for a solution, with no attempt on your own part to work it out yourself. And that's after I … | |
[B]Intro[/B] [i]This tutorial provides a brief introduction to C++ data types.[/i] [b]What is a data type? [/b] When we wish to store data in a C++ program, such as a whole number or a character, we have to tell the compiler which type of data we want to store. The … | |
Re: > hey does anyone what these errors mean: > > ----------------------------------------------------------------- > --------------------Configuration: a1 - Win32 Debug-------------------- > Compiling... > a1.cpp > C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(46) : error C2146: syntax error : missing ';' before identifier 'bSq' Only that there's a syntax error somewhere around or prior to line 46. … | |
Re: If you're already into web development in some way, you might want to consider learning JavaScript pretty well as your next stage. It's a programming language in its own right, the syntax is very much like the C family of languages and it will become immediately useful to you in … | |
Re: I would argue that your code suffers from excessive commenting, which is as bad as under-commenting. I also have a personal preference for avoiding end-of-line comments in all but the simplest of cases, but that's personal preference. Let's look at some examples: > int n; // number of points in … | |
Re: I've been staring at computer monitors for years and still have excellent vision. You sure there's not some other reason? No dirty habits?? As far as the Bloodshed IDE (Dev-cpp) is concerned, I've been using it for some time and would recommend it to anyone who wants a free compiler … | |
Re: There's no simple answer to that question. You will find examples of CMM level 3-5 companies that are large and cover the whole spectrum. | |
Re: Hi Fishman, I believe I've seen you post this on another forum and had a response there already. Are you sorted now or still having a problem? | |
Re: Hi Naresh, You appear to have quoted the original post without adding anything. Did you have something to add? A question, or additional response? Care to try again? Bob | |
Re: What superpower would I most likely want? Simple. The ability to fart at will. When I was at school "Lanky" Richardson could do it, and he commanded respect. Failing that, the ability to invent things that would truly benefit the human race: - self-washing dishes - a never-ending toilet roll … | |
Re: There are simply too many problems with your code as it is at the moment for someone to come along and fix it for you. You're a long way off having working code. I do wonder how you've come to have such code, whether you got it from somewhere else … | |
Re: I agree with Inscissor, few people these days believe it's worthwhile learning C as a path to learning C++ if what you want to do is C++. (Of course, C is worth learning in its own right if you want to do C). If you search a little longer, there … | |
Re: This is a very old thread now, and I notice that the original poster - Thamior - hasn't been active on the site for over six months. Would be interesting to know if he ever got off the ground with this. |
The End.