1,359 Posted Topics

Member Avatar for rimsha240893

First off, we don't do other people's homework for them. Second, we *don't* do other people's homework for them. And third, ***we don't do other people's homework for them***. Sensing a pattern here yet? No one here will simply hand you a solution on a silver platter. If you show …

Member Avatar for rubberman
-1
167
Member Avatar for london-G

No, the DBMS is the SQL library or process that the application interfaces with to manipulate the database. For example, MySQL is a DBMS, but an application that uses MySQL would not be.

Member Avatar for london-G
0
244
Member Avatar for HōñËy
Re: C++

Let's see, old style headers with extensions, `<conio.h>`, `void main()` - let me guess, your professor is using Turbo C++ as your compiler? */me checks OP's locations* Ah, Pakistan, that explains that. This comes up a lot, and the answer is that there's nothing to be done about it. Pity, …

Member Avatar for David W
0
283
Member Avatar for SUBHENDU_1

**Aditya_13**: While your willingness to help is commendable, it is ill-advised in this instance. Why? Because the OP didn't show any evidence that they had put any effort into the project themselves. There is a rule here a Daniweb that querents have to give some indication that they have tried …

Member Avatar for David W
0
179
Member Avatar for ArpitJ.25
Re: C++

The elaborate on DaveAmour's answer, you should know that C (the predecessor of C++) does not have a built-in boolean datatype, and until the C99 standard didn't have a standard defined one either. Thus, it has long been the convention in C to use `int` variables as booleans, with 0 …

Member Avatar for Schol-R-LEA
0
170
Member Avatar for Teo_1

The first step is to import the GUI library you mean to use. Since [a set of bindings for Tk](https://docs.python.org/3/library/tkinter.html) is included with the Python standard library, that's probably the one you'll want to use; let us know if you want a different toolkit such as wxWindows or Qt. Assuming …

Member Avatar for vegaseat
0
153
Member Avatar for dolly55

Can you clarify what you mean, please? Is it that changing the source code leads to it failing to have any output at all, or is it that the output window is closing as soon as you finish the input? I ask this because the latter problem is a known …

Member Avatar for rubberman
0
6K
Member Avatar for Khalil_2

*I know I've been using this a lot, but the OP in this case [really needs this particular anvil dropped on his head](http://tvtropes.org/pmwiki/pmwiki.php/Main/SomeAnvilsNeedToBeDropped).* First off, we don't do other people's homework for them. Second, we *don't* do other people's homework for them. And third, ***we don't do other people's homework …

Member Avatar for Schol-R-LEA
-1
258
Member Avatar for studyabroad

As Moschops said, the NULL pointer is essentially a marker. Setting a pointer to NULL is a way of indicating the pointer is in an unusable state. Now, as for it's uses, they mostly relate to handling dynamic memory. You generally want to initialize any pointer that you don't have …

Member Avatar for rubberman
0
123
Member Avatar for Ma Nicole Ydralyn

You're correct that `gotoxy()` is specific to the Borland compilers; there's no standard equivalent for it, exactly, but for this purpose, the code you have is good beginning. I would recommend making a few changes to get it working: void draw_box(int width, char top, char sides, char bottom) { cout …

Member Avatar for vegaseat
0
165
Member Avatar for Gayal

This is all getting very repetitive, in this thread and [others](http://www.daniweb.com/software-development/computer-science/threads/452680/help-porject-topic-needed#post1962794). Can someone make a sticky FAQ with project suggestions?

Member Avatar for Ssandhya
-2
3K
Member Avatar for Ma Nicole Ydralyn

If you don't mind me asking, did your instructor actually teach you to use `goto`, and more importantly, were you actually directed to use it? I would find it deeply concerning if a professor were to even *mention* `goto` in an introductory course. Actually teaching its use is simply unacceptable. …

Member Avatar for deceptikon
0
392
Member Avatar for Ma Nicole Ydralyn

As rubberman said, your statement doesn't make much sense. Could you please explain a little clearer just what it is you need help with?

Member Avatar for Ma Nicole Ydralyn
0
161
Member Avatar for masterinex

I should also add that, strictly speaking, in C prior to the C99 standard, all declarations within a function needed to be made *before* any other statements. I only bring this up because you `#include <conio.h>`; the console I/O library is *not* a standard part of C, and is associated …

Member Avatar for deceptikon
0
450
Member Avatar for Njay19

If you don't mind me asking, why would you need to, given that Excel can sort a row or column of data with a single push of a button? I don't doubt you need it, I'm just looking for some background on the matter.

Member Avatar for Njay19
0
317
Member Avatar for rayhan85

OK, first off, this code as posted isn't valid; you have the `TestAndTest()` function (which I assume is actually supposed to be `TestAndSet()`, but that's an aside) inside the `main()` function, which is an error (C does not allow for nested functions). I assume it is a quirk of cutting …

Member Avatar for Schol-R-LEA
0
254
Member Avatar for TObannion

The problem is quite simple: your indentation is off. Lines 25-65 need to be one level of indent to the right. > Please don't tell me how to shorten it, I want this to be a very understandable (from a very new beginner perspective) program so I want to keep …

Member Avatar for TObannion
0
251
Member Avatar for Seandean_1

In C, you cannot directly compare compound structures such as strings the way you can simple values such as `int`s or `double`s; or rather, you can in the case of strings, but you would end up comparing the *memory addresses* where the strings begin rather than the strings themselves. What …

Member Avatar for Seandean_1
0
217
Member Avatar for Kenneth_3

While the program looks good functionally, I would like to make some stylistic suggestions. 1. You generally want to separate the functions which operform computation from those which do input and output. This principle of *decoupling* serves to make the program more modular and easier to fix and modify. Separating …

Member Avatar for Schol-R-LEA
0
249
Member Avatar for Simil

Considering that most of the instructors in question also teach C++ as if it were C - using the `stdio` functions instead of `iostream`, not covering classes at all, etc. - I would say this is likely.

Member Avatar for misi
0
227
Member Avatar for Nataliya_1

Part of the problem lies in trying to write out the `struct`s directly, rather than writing the individual fields out in an system-independent form (a process called *serialization*). A `struct` is not necessarily straight data; there may be padding for architecture-specific memory alignment, for example, and if the `struct` contains …

Member Avatar for Schol-R-LEA
0
216
Member Avatar for baudday

**Darwin_1**: You might want to check the timestamp on the thread; Baudday hasn't been active on Daniweb in three years. Also, it is generally considered bad form to ask for code without showing your own work first. To quote the [Daniweb forum rules](https://www.daniweb.com/community/rules) in this regard: > *Do* provide evidence …

Member Avatar for Schol-R-LEA
0
2K
Member Avatar for rose_2

There are two really simple approaches you could take: 1. Use two loops, inner and outer, which step through the array. Have a second array hold any duplicate values you find. 2. Sort the array (or a copy of it if you need to preserve the original order), then walk …

Member Avatar for Schol-R-LEA
0
160
Member Avatar for gencc

**rose_2**: While your enthusiasm for answering the question is commendable, it is generally considered a poor practice to provide outright answers to problems when the OP hasn't demonstrated that they had already made a good-faith effort to solve the problem before posting here - it encourages cheating, or at least …

Member Avatar for Schol-R-LEA
-1
127
Member Avatar for Dragos_1

I would add that the [Travelling Salesman Problem](https://en.wikipedia.org/wiki/Travelling_salesman_problem) (which this could be, depending on you interpret the traversal requirement) is known to be an NP-Hard problem, so even if you succeed in getting it to work, it may have quite a long run time depending on how many nodes the …

Member Avatar for Schol-R-LEA
0
756
Member Avatar for Saeed_3

Consider a forum meant to assist programmers in learning to program, but whose members are constantly bombarded with requests from students who want their homework done for them with no effort on their own part. Explain why it is counterproductive to both the members and the students for the members …

Member Avatar for Schol-R-LEA
0
378
Member Avatar for Mayukh_1

The reason is simple: the variable `sample` is *not* external to the **main.c** file, and in fact is a local variable of the `main()` function itself. When you declared the variable as `extern`, you were telling the linker, "I want to access a variable defined in another object", which isn't …

Member Avatar for Mayukh_1
0
313
Member Avatar for terriblecoder

Interestingly, either you or a classmate of yours posted [essentially the same issue](https://www.daniweb.com/software-development/cpp/threads/493689/high-fashion-department-store) some four days ago, under a different username. You might want to view the answers given at that time. Given what you are saying, I gather that most of the code was given to you by the …

Member Avatar for Schol-R-LEA
0
296
Member Avatar for s.inayath123

> write a program for left recursion? Setting aside the fact that you are asking us to do your work for you, which is against the general policy of Daniweb, this sentence (fragment) doesn't make much sense. I assume what you meant was that you need to write a parser …

Member Avatar for Schol-R-LEA
-1
109
Member Avatar for Sana_5

What program? I see no code posted here. As we've already said, you need to demonstrate that you have made an attempt in earnest to solve to assignment, *and* post useful information about the problems you are experiencing and pose meaningful questions about the issues you are experiencing. ***We will …

Member Avatar for Schol-R-LEA
0
410
Member Avatar for Talha_6

*Once more with my standard reply for this sort of thing:* First off, we don't do other people's homework for them. Second, we *don't* do other people's homework for them. And third, ***we don't do other people's homework for them***. Sensing a pattern here yet? No one here will simply …

Member Avatar for Schol-R-LEA
-2
640
Member Avatar for New Jack

The error is a very simple one: you misspelled the header name in your program source file. Just change the 'g' to an 'e' and it should go through correctly. BTW, I would do four other things. First, I would remove the `using namespace std;` from the header file, and …

Member Avatar for New Jack
0
261
Member Avatar for kayleigh0411

The reason it isn't printing the rest of the list is because... you don't have it printing the rest of the list. Try the following: void printBackwards(ListNodePtr currentPtr) { // if list is empty if(currentPtr==NULL) { puts("List is empty.\n"); return; } // end if else if ( currentPtr->nextPtr != NULL …

Member Avatar for kayleigh0411
0
281
Member Avatar for nihade

Just a quick guess, but on line 59, I think you want to change MOV CL,INSTR1+1 to LEA CL,INSTR1+1

Member Avatar for Schol-R-LEA
0
348
Member Avatar for soe win

**soe win**: You may want to read [this blog post](http://www.peter-urda.com/2010/09/solution-folders-in-visual-studio-2010-explained) if you aren't clear about what the Solution folder is and how to work with it. While the post covers an earlier version of Visual Studio, the principles have not changed much.

Member Avatar for Schol-R-LEA
0
2K
Member Avatar for samer.aboufakher.3

Let's start by getting this code into some semblance of consistent indentation: #include<iostream> using namespace std; class product { private: int code; char name[20]; double price; int instock; double soldperyear[12]; public: product(int,char[],double,int); void setproduct(int c , char n[],double p,int i) { setcode(c); setname(n); setprice(p); setinstock(i); } void peryear(int i) { …

Member Avatar for Moschops
0
202
Member Avatar for nketia

*/me dusts off the boilerplate response for this sort of thing... again:* First off, we don't do other people's homework for them. Second, we *don't* do other people's homework for them. And third, ***we don't do other people's homework for them***. Sensing a pattern here yet? No one here will …

Member Avatar for Schol-R-LEA
0
143
Member Avatar for Sandro_1

**Sandro_1**: If you don't mind me asking, what is it you are trying to accomplish? I'd guess you were calculating the median of the data set, but you didn't specify that the `ArrayList` was sorted; if it isn't, then it is hard to see what you would be getting from …

Member Avatar for Schol-R-LEA
0
284
Member Avatar for VengefulToast

As Moschops said, te stream insertion and extraction operators are usually implemented as free functions that is are `friend`s of the class, rather than as members, but it would be useful to understand *why* this is the case. The reason you can't have it as a member operator is because …

Member Avatar for Schol-R-LEA
0
494
Member Avatar for samer.aboufakher.3

> lol guys i told u i need help in the main at > Using the two objects, pointer and reference test all the member functions of your class Actually, you didn't; you simply copied the assignment statement with no information of where you needed help. In any case, you'll …

Member Avatar for rubberman
0
188
Member Avatar for miazara

**miazara**: I see that you tried to reply to DaveAmour and rubberman, but you entered the code into the comments, which is too short for such purposes. You need to use the Reply box at the bottom of the page to send a full length reply.

Member Avatar for Schol-R-LEA
0
175
Member Avatar for Doogledude123

Wouldn't make sense to have the class implement `Serializable` rather than hard-coding the file output? I haven't used Java serialization before, so I don't know the limitations and weaknesses of it, but I would expect that using that would save a good deal of effort and make the code less …

Member Avatar for JamesCherrill
0
852
Member Avatar for Mamed

First off, as I have said elsewhere, in C++ `main()` should always have a return type of `int`. Some older compilers allowed `void main()`, but it is actually not permissible under the standard. It should return zero for a successful program run or an error code on failure. Second, the …

Member Avatar for Schol-R-LEA
0
522
Member Avatar for zrd0808

Given that zrd0808 hasn't been on Dnaiweb in four years, I doubt you'll get an answer :-)

Member Avatar for Schol-R-LEA
0
445
Member Avatar for Casey890

It's quite simple: replace the trailing space, `' '`, with `endl` (the end of line marker for ostreams). BTW, you can always use `endl` instead of `'\n'` in C++ stream output, the only difference is that `endl` (IIRC) also flushes the stream (that is, it forces it to go to …

Member Avatar for Casey890
0
156
Member Avatar for akane.mikazuki

Sadly, my earlier recommendation *is* as kind a response as I can make; it really is terrible for any professor to be forcing their students to use something as long outdated as Turbo C++, and students shouldn't put up with it. However, seeing how you are stuck in this position, …

Member Avatar for Schol-R-LEA
0
341
Member Avatar for anumash

The issue is not between arrays and other variables in general, but arrays and *pointers* to said arrays. An array is not a pointer; it is a regular variable, just one which names a block of values rather than a single value. The usual syntax for accessing the elements of …

Member Avatar for Schol-R-LEA
0
155
Member Avatar for pww71

All well and good, and of some definite interest in general, but... why post this here, except as a way of advertising your blog and thesis? This forum is mostly for assisting others in finding solutions to problems; your neither ask a question nor (within the post) provide an answer. …

Member Avatar for mike_2000_17
0
260
Member Avatar for mridul.ahuja

Well, to begin with, this is a C++ program, not a C program, and a poorly written one at that. The header formats indicate that it probably dates back to the late 1990s, when the then-new C++ standard was still being formalized - either that, or the programmer didn't understand …

Member Avatar for Schol-R-LEA
0
289
Member Avatar for tgreiner

While you aren't showing it, I assume you are closing the `#ifndef` at the end of the file. As for why it isn't finding the `std::string` class, I'm not sure. While I do see something that ought to be a showstopper - the C library headers `<time.h>` and `stdlib.h>` should …

Member Avatar for Schol-R-LEA
0
10K

The End.