3,183 Posted Topics

Member Avatar for nitin1

Step back a moment and consider *why* you need `clrscr` or any variations. It's my fairly strong belief that when you start needing to do any non-linear manipulation of the console, you should probably bite the bullet and move to a GUI. That said, if you're on a Windows system …

Member Avatar for deceptikon
0
1K
Member Avatar for kanagamani

At that granularity, everything is efficient. However, tricks for swapping without a temporary variable have a higher chance of *not* being as efficient due to potentially confusing the compiler's optimizer. The lesson to be learned is that it's not worth trying to optimize a few bytes from a single scalar …

Member Avatar for vegaseat
-1
128
Member Avatar for iLikePHP
Member Avatar for iLikePHP
1
244
Member Avatar for skyyadav

You can get a list of processes and parse the result, but it's highly OS dependent.

Member Avatar for richieking
0
142
Member Avatar for iamcreasy

The code will compile, but the subscript operator for `std::vector` does *not* throw an exception. To get an out of range exception you must use the `at` member function.

Member Avatar for deceptikon
0
438
Member Avatar for HunainHafeez
Re: WCF

WCF is really just a more powerful sibling of web services. HTTP is the transport protocol of the web, and SOAP is a messaging protocol for packaging data. Serialization takes raw data and converts it to a convenient storage or transport mechanism like binary or XML.

Member Avatar for deceptikon
0
87
Member Avatar for G_S

> I know that having the same person appear in the same table more than once is troublesome. Basically you've described the difference between a normalized and denormalized database. A normalized database stores the actual data in a single table and uses referential links (such as primary keys) to share …

Member Avatar for G_S
0
262
Member Avatar for new_developer

It's a little tricky because integers can be represented with multiple characters. Unless you only need a single digit, how do you plan to signal the end of the integer using raw input?

Member Avatar for Moschops
0
187
Member Avatar for Thundermax

Not enough information. Please show us how you're defining and populating your string.

Member Avatar for Adak
0
215
Member Avatar for Tewhano

The way you've indented your code suggests the error. If nextRow++ needs to be inside the inner loop, the loop body must be surrounded with braces: for (col = 0; col < NUM_FOUR; col++) { matrix[(nextRow)][col] = matrix[(row)][col] * 3; nextRow++; }

Member Avatar for Tewhano
0
211
Member Avatar for ReyJEnriquez

Close. There's a Rows property that represents a collection. Unfortunately, `DataTable`s are somewhat awkward to work with.

Member Avatar for ReyJEnriquez
0
113
Member Avatar for Robin_3

You can pull everything with a single cin call, provided the two items are separated by whitespace during input: cin >> a >> b; Adjust your prompts to that and it'll be closer to what you want. However, if you want free form control over the console, you'd be better …

Member Avatar for Ancient Dragon
0
490
Member Avatar for amrita111

This seems like it may be better suited to a server cron job, since I'm assuming it depends on the date of the file's creation relative to the current date. You'd want some schedule task that runs daily.

Member Avatar for JorgeM
0
134
Member Avatar for preetha9

How are you creating the database? Libraries such as the Entity Framework can create the database for you, and deployment is trivial given the correct connections and permissions into SQL. If the database was created manually, you need to recreate it manually, provide SQL scripts that recreate it, or include …

Member Avatar for deceptikon
0
166
Member Avatar for <M/>

> So... what are your favorite workouts? That's a slippery slope if you ask the right person. My favorite workout is a 4 day upper/lower body split: Monday: Lower Tuesday: Upper Wednesday: Rest Thursday: Upper Friday: Lower Weekend: Rest The individual exercises vary, but my days are broken down into …

Member Avatar for iamthwee
0
286
Member Avatar for castajiz_2

I'm unable to reproduce the vaguely stated problem on Opera. Can you provide precise reproduction steps?

Member Avatar for castajiz_2
0
247
Member Avatar for sneha_

> root posseses some junk value.. Just a correction, but since `root` is a global variable, it's properly initialized to 0 (ie. a null pointer). It doesn't contain a junk value, though line 41 is indeed erroneous; it should be pushing `temp` rather than `root`.

Member Avatar for deceptikon
0
2K
Member Avatar for mzeewashooo
Member Avatar for deceptikon
0
83
Member Avatar for ShadyTyrant

> Should I go for a degree in Computer Science, or are there other educational paths I should take? Since you're already in the field and have experience, I wouldn't waste my money on a degree. You could buy a CS textbook or two and be just as well off, …

Member Avatar for jwenting
0
331
Member Avatar for Nicholas_1

What kind of variables? Are we talking just scalar values or data structures? The former are easy to export, but the latter could take a little thinking to get a format that's easy to both export and subsequently import.

Member Avatar for Nicholas_1
0
183
Member Avatar for H_beginner

How are you building the files together into an executable? The code looks fine, but the errors suggests that main.cpp and definition.cpp aren't linked together.

Member Avatar for tinstaafl
0
228
Member Avatar for Andy90

> What will be c++ equivalent of this snippet? There would be no differences (barring the obvious syntax errors, but that would be broken in both languages). The FILE structure is a standard type inherited from C. > Also, is this struct correct for c++? Yes.

Member Avatar for Ancient Dragon
0
674
Member Avatar for zahnsoftware

> How can I convince my boss that having me travel for extending amount of time to visit clients or prospects is not the most productive use of my time. I'm not entirely sure that's the case, to be honest. At a small company you must wear many hats, simply …

Member Avatar for Mike Askew
0
339
Member Avatar for Dani

I may rewrite a number of my tutorials and close down my site if Daniweb's interface is suitable for...shall we say, somewhat longer tuts with plenty of awesome code? ;) I don't think I've seen any really long ones yet.

Member Avatar for Dani
1
237
Member Avatar for lnkandi

Yes, someone can assist. But nobody will do it for you. Please point out what difficulties you're having so that it doesn't sound like you want your homework done for you.

Member Avatar for ReyJEnriquez
0
114
Member Avatar for cambalinho

> why the 'PRO's' want avoid the "\n"? It's the opposite. You should avoid `endl` unless you know that the stream needs to be flushed afterward. Otherwise you should prefer `'\n'`. `endl` is implemented like this: inline ostream& endl(ostream& out) { out.put(out.widen('\n')); out.flush(); return out; } There's always an implicit …

Member Avatar for cambalinho
0
248
Member Avatar for Waseemaburakia

Please ask a specific question. Simply posting your homework requirements suggests you want someone to do the work for you.

Member Avatar for slate
0
262
Member Avatar for Assembly Guy

> Albeit not the most straight forward way :( Our mark read algorithm was probably one of the most obtuse in the entire code base (excepting the editor parser which neither of us wrote). I don't imagine *any* solution would be straightforward. ;)

Member Avatar for Assembly Guy
0
308
Member Avatar for faysal.ishtiaq_1

Can you be more specific about what you can't complete? It's somewhat unreasonable to expect us to review your code and figure out what's missing from a brief description of the requirements.

Member Avatar for Adak
0
158
Member Avatar for lexaeterna
Member Avatar for <M/>

I intend to switch to a Windows phone when I get tired of my 4S. ;p

Member Avatar for vegaseat
0
424
Member Avatar for kyle.mace.35

Do you want the open mode that was passed to the constructor or open member function? Or do you want to know dynamically whether the last operation was a read or a write? Ultimately, you'd need to maintain a flag providing this information, which could be stored in the `fstream` …

Member Avatar for deceptikon
0
181
Member Avatar for DyO1

Yes, of course there's a way to do that. It's pretty straightforward in that you open the file and then read or write the data. However, it does depend somewhat on the format you want for the file.

Member Avatar for DyO1
0
672
Member Avatar for dev90

> But as i am returning a pointer s I can't free it before returning it. The caller has to free it. While the ideal for robustness is to have memory allocated and freed at the same execution level, that's not always practical. > I take a char array[100],Perform operation …

Member Avatar for dev90
0
264
Member Avatar for seovela

I don't remember off the top of my head, but it's not more than 10. You should be able to add a signature now from [here](http://www.daniweb.com/members/edit_profile).

Member Avatar for happygeek
0
387
Member Avatar for programer.cpp
Member Avatar for Tinnin

> However, the values for INT_MIN and INT_MAX are shown in the appendices as being the same as SHRT_MIN and SHRT_MAX repsectively. The *minimum* range of int is indeed 16 bits, even though you're unlikely to see less than 32 bits on a modern implementation. > I was hoping that …

Member Avatar for Ancient Dragon
0
196
Member Avatar for satnav_8
Member Avatar for Henshens

Your code is horribly broken. I'm guessing you meant to post the errors you're getting and ask what's causing them, as per [this helpful guide](http://www.catb.org/esr/faqs/smart-questions.html).

Member Avatar for UFOOOOOOOOOOO
0
188
Member Avatar for iFrolox

> Im trying to accomplish to save both aco####s and settings into the same xml like so Then if you want to continue using `XmlSerializer`, you should wrap those two classes in a another class, then serialize *that* one: class AppSettings { public General GeneralSettings { get; set; } public …

Member Avatar for iFrolox
0
134
Member Avatar for cambalinho

> 1 - why some C++ PRO don't advice me use these code?(making properties) Because it's awkward (as you've discovered), unnecessary, and a complete solution isn't as good as what you'd get with another language like C#. C++ "pros" do without excessively awkward fluff.

Member Avatar for cambalinho
0
333
Member Avatar for kurianjoseph

I think WYSIWYG is ideal for the display aspects of web development (HTML and CSS, specifically), and in the next 10 years the tools will hopefully be good enough that we don't *need* to drop down to the code to do what we want. As it is, drag-drop-configure gets you …

Member Avatar for deceptikon
0
179
Member Avatar for castajiz_2

> My question is how does the first example work since i haven't used the .Dispose() method How would that stop the code from working? You've merely failed to release resources, which depending on the resource involved may or may not cause issues down the line. > I m just …

Member Avatar for deceptikon
0
255
Member Avatar for abhimanipal

You're returning a reference to a local variable. The local variable gets destroyed, so the reference is dangling. Just return a reference to `myStore[row]` directly: template<class V, class I> V& Matrix<V,I>::operator()(int row, int column) { return myStore[row][column]; } Alternatively you can make a local *reference* to the row, then return …

Member Avatar for deceptikon
0
444
Member Avatar for charishma

Please read our rules concerning homework. We don't just give away code for homework problems without proof of effort, and even then most of us won't write the whole thing for you, we'll just push you in the right direction.

Member Avatar for deceptikon
0
72
Member Avatar for parth2911

> using this code its only print success.. That's the point of the program, to tell you whether the file was opened successfully. > i want to display file in notepad.. Please note that we're not going to write your program for you. You asked a specific question and got …

Member Avatar for parth2911
0
373
Member Avatar for Thundermax

Is the array holding the string large enough for another character? Because if so it's a simple matter of: s[size] = c; // Overwite the nul with a new character s[++size] = '\0'; // Terminate the string after the new character

Member Avatar for Thundermax
0
614
Member Avatar for k88joshi

> i have 1 question: for use dynamic arrays, can i use normal variables instead pointers? Pointers *are* normal variables. But when it comes to "dynamic" arrays, it's a bit of a misnomer because you're not creating an array, you're simulating one with dynamic memory allocation. Really the best you …

Member Avatar for cambalinho
0
744
Member Avatar for cambalinho

> that's why someone tell me for learn C# lol C# has its own quirks that complicate the learning curve, so don't expect any magic by learning a different language. ;)

Member Avatar for cambalinho
0
214
Member Avatar for chetana1111

The headers themselves don't *do* anything, they just provide declarations so that code will compile. You also need the underlying libraries, which if they aren't already provided by the implementation, most likely won't transfer easily. Your best approach would be to determine which functions you're using and then look for …

Member Avatar for deceptikon
0
48

The End.