6,741 Posted Topics

Member Avatar for Rama_Kamisetty

The code is trivial. Try doing it yourself first before resorting to cheating.

Member Avatar for ramyasowbhagya
0
93
Member Avatar for smthdeedog48

>one assignment is Functional data base, business system report,Risk Management I can guarantee that you won't get as much help here as you would in the correct forum, but your question is too vague for me to determine which forum would be best suited. Please elaborate. What class is this …

Member Avatar for Ancient Dragon
0
322
Member Avatar for jephthah

[QUOTE]noobs are continually posting mountains of unhighlighted code, and its just nearly impossible to read such messes without highlighting... i dont even want to try, it hurts my head.[/QUOTE] Dammit jephthah, you're making me feel old now. When I started posting to forums there wasn't highlighting. We were thankful when …

Member Avatar for FlamingClaw
2
218
Member Avatar for Lukezzz

>but it seems that this generator isnĀ“t really random Any deterministic method for generating random numbers won't be "really" random. That's why they're called pseudorandom numbers. They're sufficiently patternless to [I]appear[/I] random for many purposes. "Real" random numbers only come from truly random real world sources, such as the decay …

Member Avatar for Lukezzz
0
225
Member Avatar for Greeny28

>And when I do Visual Studio 2005 reports: That's because you changed only half of the equation. In the code as posted, you create a list of Vehicle objects and populate it with the Vehicle half of SportsCar objects (an effect called slicing). When you changed the list to take …

Member Avatar for Narue
0
141
Member Avatar for kaku_lala

>Why can't I use float data type to define my own boolean type? One reason might be because the comparisons are trickier. Depending on how you set this up, it could involve fudge factor comparisons, which are completely unnecessary when it comes to the concept of booleans. >Can I use …

Member Avatar for Narue
0
186
Member Avatar for serkan sendur

>let us give him one more chance? He'll get another chance: when he's automatically unbanned after the infractions expire. >despite all odds he was a valuable poster. >we need to take his age into consideration as well There are no exceptions, no double standards. It doesn't matter if you're the …

Member Avatar for ~s.o.s~
0
534
Member Avatar for hider

>now for balanced >B - O(1) >A - LOG(N) >W - 0(N) You're not thinking in terms of scalability. The best case performance for a balanced binary search tree during search operations is O(log N), so is the average and worst case, which is why balanced trees are so desirable. …

Member Avatar for thoughtcoder
0
141
Member Avatar for CoolAtt

>fgets places '\n' char at the end of string. To the OP: ArkM's code does the right thing, but the quoted statement is incomplete. fgets preserves the newline, but not if the buffer is filled. So solutions like the following distressingly common one are incorrect: [code=c] if ( fgets ( …

Member Avatar for Aia
0
5K
Member Avatar for xponse

>Not the express edition ? The C/C++ compiler is identical in all editions. >without the platform SDK it cant make standard Win32 apps, making it .NET only. Well, technically Win32 applications aren't "real" C++ either. Only standard C++ is "real", and you can write both standard C (C95) and standard …

Member Avatar for ~s.o.s~
2
458
Member Avatar for arpeggio54

effective, this isn't a chat room. If you don't have anything to add then please don't reply. If everyone posted things like "Nice!" or "I agree!", then it would become difficult to find the useful information in a thread. If you must share your enjoyment of a post, add to …

Member Avatar for Narue
0
88
Member Avatar for Sam-J

>hey Salem i didn't ask my question to get links or somethin Of course not. You probably asked with the intention of having someone else find and point out the problems for you. That way you can finish the program and not have to think. >cuz i'm almost sure that …

Member Avatar for WaltP
0
407
Member Avatar for hypernova

[QUOTE]I have asked a few people and most of them tell me that trying to learn java is no good if I already dont know C++, because then I will not know what the concept of "classes" is, and therefore will not be able to understand Java properly.[/QUOTE] They're full …

Member Avatar for Narue
0
146
Member Avatar for NicAx64

Good, god. Haven't you ever heard of proofreading? And to answer your question, jealousy is fine as long as you use it productively.

Member Avatar for NicAx64
0
309
Member Avatar for blackhawk9876

>2.1. Write a recursive value-returning function that searches a linked list >2.2. Write a recursive value-returning function that returns the maximum value in a linked list "Recursive" and "linked list" are generally not terms that should be used in the same sentence. A linked list is normally a linear structure, …

Member Avatar for siddhant3s
0
110
Member Avatar for Erroneous Seth

>it's probably because you aren't freeing the block >of memory you're allocating in your call to malloc No, it's probably not. Even if the process doesn't release allocated memory when it terminates, all you're likely to get is leaked memory, not a segmentation fault. >memcpy(&pData, &t, sizeof(t)); >memcpy(&a, &pData, sizeof(t)); …

Member Avatar for Erroneous Seth
0
246
Member Avatar for AntonioMG

An interface is just that: an interface. You need to implement it in another class, then you can use it through that class: [code=csharp] public class Foo: DS.GS.Admin.BrokerAdmin { public int GetCount() { return 12345; } } [/code] [code=csharp] Foo foo = new Foo(); BrokerAdmin ba = foo; Console.WriteLine( ba.GetCount() …

Member Avatar for kvprajapati
0
262
Member Avatar for tux4life

>>>Is this the right way to do it? >No. No. When you use nothrow, new returns a null pointer instead of throwing bad_alloc. Your catch is also malformed. ;)

Member Avatar for Ancient Dragon
0
217
Member Avatar for miskeen
Member Avatar for pczafer

>what shoul i do???? Post more code (preferably something bare bones so we're not overloaded with unnecessary crap). currentSize isn't even defined in that snippet.

Member Avatar for pczafer
0
92
Member Avatar for localp

>ya links does not help. The Eternally Confuzzled link goes to my website. Could you explain why that tutorial didn't help so that I can improve it?

Member Avatar for Narue
0
82
Member Avatar for MicrosoftMahmou

What do you know about new[] and delete[]? If the size has to be variable then you're going to end up messing with dynamic memory, as I assume you can't use the std::vector class. Here's some code to get you started: [code=cplusplus] int **p = new int*[M]; for ( int …

Member Avatar for tux4life
0
98
Member Avatar for pikkas

Each one designate a level of indirection (a pointer). So you can say that adj_matrix is a pointer to a pointer to int. My spidey sense says that adj_matrix is intended to be a dynamically allocated adjacency matrix, so you can do a google search for dynamic arrays in C++ …

Member Avatar for pikkas
0
132
Member Avatar for nanchuangyeyu

You had an assignment in your inner loop condition rather than a comparison. I also added the code to insert the new columns as it's an identical operation to inserting the new rows: [code=cplusplus] #include <iostream> #include <vector> using namespace std; int main() { vector<short>vec; vector< vector<short> >vec_2d; vector< vector<short> …

Member Avatar for Narue
0
196
Member Avatar for Falkoner1

>it seems to be assigning it to the address of the pointer, not the value of the pointer Yep, seeing as how that's what you told it to do. Unless you do some dereferencing, you can expect to be working only with addresses. >so I'm wondering how to make it …

Member Avatar for Falkoner1
0
4K
Member Avatar for fadia

Okay, I wasted my time reading that post thrice trying to figure out what the hell you need help with. Would you care to ask a question that actually makes sense? What are these "the functions" you keep vaguely mentioning?

Member Avatar for fadia
0
164
Member Avatar for axfv

It's hard to say without seeing your code, but I'd wager your cast is wrong. Compare your code with this skeleton and tell me if you're doing something equivalent: [code=cplusplus] #include <iostream> class A1 { public: int a1; virtual ~A1() {} }; class A2: public A1 { public: int a2; …

Member Avatar for ArkM
0
179
Member Avatar for loveforfire33

>Since Generics were introduced, link lists are pretty much useless in the real world. It's certainly true that you should prefer a standard library to hand-rolled code in most real world cases. However, just because there's a library that will do it for you doesn't mean you don't still need …

Member Avatar for loveforfire33
0
157
Member Avatar for bob89

The error is saying that you declared the FlightManager constructor ([ICODE]FlightManager();[/ICODE]) but never defined it. You must give a body to any functions before you can call them.

Member Avatar for Narue
0
109
Member Avatar for ganmo

>So what I know is that virtual function is equal to abstract functions. No. An abstract function is a placeholder that has no definition and requires derived classes to implement it. A virtual function can have a definition, and in such a case will be silently inherited without any action …

Member Avatar for ArkM
0
103
Member Avatar for pvsumanbabu

>can any of u explain the order of constructors It's in the order of declaration, from base classes to derived classes. Take B1, B2, and V2. The diagram doesn't (and can't) specify whether B1 or B2 is called first because that would depend on the declaration order. This will print …

Member Avatar for Narue
0
95
Member Avatar for gooddevilgod

I think you need to differentiate between a class and an object. A class is a blueprint, a type definition: [code=csharp] namespace JSW { public class Foo { public Foo() { Console.WriteLine ( "Foo!" ); } } } [/code] Once you've defined the type Foo, you can create objects of …

Member Avatar for JerryShaw
0
287
Member Avatar for tintincute

>panel1.Height=this.BackColor.ToString(); I'm not entirely sure what you hoped this would do, but if you want to change the color of the panel, you need to change the BackColor property. For example: [code=csharp] panel1.BackColor = Color.Yellow; [/code] And this is a separate statement from changing the height.

Member Avatar for Narue
0
131
Member Avatar for edi843

In my experience, a large amount of data will slow down the grid regardless. Perhaps if you have that much data, you should page it so that only a fraction (one page) is loaded and visible at one time. Then you can divide the data into pages such that the …

Member Avatar for Narue
0
92
Member Avatar for nanodano
Member Avatar for cniggeler
0
151
Member Avatar for BlackStar

>I'm trying to have a pointer point to anothier pointer. How do you make a pointer point to a non-pointer? Just add a level of indirection: [code=cplusplus] int x = 12345; int *px = &x; // Add a level of indirection int **ppx = &px; // Same thing! Woo-hoo! std::cout<< …

Member Avatar for BlackStar
0
244
Member Avatar for Sky Diploma

>I am getting a segmentation fault when i run the follwing program. How does your code handle N^0? >Code tags work sometimes and code tags donot work. Define "do not work".

Member Avatar for tux4life
0
233
Member Avatar for Michalina
Member Avatar for pdunc88

>My problem is I would like to create a seperate array of characters for each element of that array. To what end? There are ways to do what you want, but I'm not entirely sure what you want makes sense.

Member Avatar for pdunc88
0
90
Member Avatar for jyo_84

Sorry, we don't give homework help without proof of effort on your part, and we don't give away homework answers. If you want to cheat, go elsewhere.

Member Avatar for mayank.cracker
0
76
Member Avatar for vksmaini
Member Avatar for rishabjain
0
318
Member Avatar for skisky

If your brain is going numb, it probably means you're overwhelmed with everything that needs to be done. Break the problem down into multiple smaller problems, then solve each one individually. The requirements are pretty specific about what the result will look like (three functions, dynamic allocation, blah blah blah).

Member Avatar for Absaar
0
156
Member Avatar for tasosa

You've already pinpointed the problem. You're storing the address of your input buffer rather than making a copy of the input string. As such, all references to the color will reflect the current contents of the buffer. If you don't want that, you'll have to make a copy each time.

Member Avatar for Narue
0
193
Member Avatar for vddmanikanta
Member Avatar for Narue
0
55
Member Avatar for serkan sendur

Alright serkan sendur, that's quite enough. I've been ignoring your creepy and unhealthy fascination with me thusfar, but now you're getting dangerously close to harassment.

Member Avatar for Narue
-3
264
Member Avatar for serkan sendur

>Do you also think that unix and programming on unix sucks? Unix is fabulous and programming on Unix is sheer joy. X programming on Unix is what sucks. I think more programmers have lost their sanity to X than MFC.

Member Avatar for serkan sendur
-1
417
Member Avatar for strickenUK

>recNo*20 + sizeof(double) Presumably when recNo is 0, you want to seek to the 0th byte. But because the multiplication is done first, you get the (0 + sizeof(double))th byte.

Member Avatar for strickenUK
0
851
Member Avatar for Crago3

You only have one loop rather than two. For a program such as this I would expect an outer loop to manage the number of strings that are processed and an inner loop to handle processing a string: [code=cplusplus] do { char ch; while ( cin.get ( ch ) ) …

Member Avatar for tux4life
0
255
Member Avatar for quetzal_7
Member Avatar for quetzal_7
0
111
Member Avatar for FandaR

>I havent time to do it. I can only imagine what your professional life would be like: Boss: Welcome to your new job! You: Thanks! Boss: Here's you're first assignment. You: I haven't time to do it. You do it for me. Boss: You're fired. If you don't do your …

Member Avatar for Narue
0
81

The End.