3,183 Posted Topics

Member Avatar for stultuske

> I think this is caused by removing the new posts, but, if this is so, isn't it possible to also update the 'last posted' date (if that's how it's stored) so that it won't come up any longer as one of the last updated threads? It's possible, but not …

Member Avatar for stultuske
0
159
Member Avatar for Vish0203
Member Avatar for Vish0203
0
253
Member Avatar for LastMitch

If none of the sub forums are quite right for your question, you can post to the category (ie. Databases) and tag the thread accordingly.

Member Avatar for LastMitch
0
273
Member Avatar for charles.haselden.3

[This](http://eternallyconfuzzled.com/tuts/languages/jsw_tut_pointers.aspx) may help. You can find details about dynamic memory for arrays near the bottom, but the rest is useful information about pointers too. :)

Member Avatar for deceptikon
0
270
Member Avatar for Dani
Member Avatar for rithish

Semicolon. And you've been asked before to state what the error is. If you continue to post vague requests for help, I'll stop trying to help you.

Member Avatar for rithish
-1
162
Member Avatar for DavidB

> I am wondering if there is a way to include subscripts or superscripts in Daniweb? Not presently. When we were using vBulletin as the back end we allowed TeX formatting, but it was very much unused. > I tried to use HTML code (<sub> and <sup>), but that didn't …

Member Avatar for WaltP
0
128
Member Avatar for teachMyself

> Freeing a NULL pointer will cause the program to crash. That's incorrect. Calling free() on a null pointer is guaranteed to be a no-op.

Member Avatar for WaltP
0
271
Member Avatar for pooh1234qwerty

I think the errors can be summarized thusly: **an array is not a pointer** and **a string literal may not be modified**.

Member Avatar for deceptikon
0
125
Member Avatar for gem.gonzales.9

If you can't think of a program with all of those constructs, maybe you shouldn't be using them all at once yet? ;)

Member Avatar for deceptikon
0
105
Member Avatar for finston

Undefined reference means you've declared a name but not provided a definition anywhere. This usually happens when using a library's header without linking to the library.

Member Avatar for deceptikon
0
281
Member Avatar for Andrei15193

"Better" is a meaningless word without any context. Are you asking this question out of general curiosity or because you want to use one of those frameworks for your next project? If it's the latter, what are the needs of the project? If it's the former then I can only …

Member Avatar for Andrei15193
0
200
Member Avatar for jonnyc++

> So my question is why virtual functions are needed if same task can be achieved by scope resolution operator? I'll answer your question with another question: If you're given nothing but a pointer to the base, how do you know which type to use for the scope resolution operator?

Member Avatar for jonnyc++
0
718
Member Avatar for I_m_rude

If the length of your list is large enough that a faster sort is warranted, then a linked list is the wrong choice of data structure. But I'll mention two things: 1. Bubble sort is a bitch with linked lists. [Insertion sort](http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_sorting.aspx#insert) is *much* easier to implement. 2. Following that …

Member Avatar for I_m_rude
0
155
Member Avatar for keryll

What do you know about [binary coded decimal](http://en.wikipedia.org/wiki/Binary-coded_decimal) representation? That appears to be what the function's intended purpose is, which is a bigger issue than the type of `pBcdBin`. But the type of `pBcdBin` is a pointer to zero or more bytes (that's what uin8_t represents here), where neother the …

Member Avatar for keryll
0
331
Member Avatar for love_you_4rever

> Because I couldn't install netbeans at home so I couldn't try. So NetBeans is the only C++ implementation? I see you tried sooo hard. :P

Member Avatar for WaltP
0
83
Member Avatar for np complete

> This is obsolete and its use is frowned upon. So are TSRs. If you're not into obsolete stuff, learn to write a Windows service (assuming Windows as the natural progression because you're talking about DOS).

Member Avatar for deceptikon
0
732
Member Avatar for nida.lodhi.7
Member Avatar for Vasthor

The problem is that indexings() takes its parameters by reference rather than by value or const reference. Unfortunately, there's not really a fix for that unless you remove the updating of `totals` and put it somewhere else. For example: for (vector<Student_info>::size_type i = 0; i < students.size(); ++i) students[i].totals = …

Member Avatar for Vasthor
0
273
Member Avatar for plike922

> What is the value of EOF in c...? The value of the macro EOF is completely irrelevant because it's an internal standard library flag that has no meaning to either you or the outside world. Though nitin1 is correct that it's usually defined as something like -1.

Member Avatar for I_m_rude
0
529
Member Avatar for manishanibhwani

> can anyone tell me whether we can use const variables for case ... No, case labels must be a compile time constant. In C the `const` keyword doesn't make the variable truly constant, it just makes it read-only under normal circumstances. Turbo C might offer a extention to support …

Member Avatar for deceptikon
0
188
Member Avatar for I_m_rude

> I would say that, particularly in portable code, the C bitfield syntax is of no use. Only if you're using it to map an object or performing I/O with it. Bitfields are especially useful for flags, and in that case they're generally simpler to work with "out of the …

Member Avatar for deceptikon
0
141
Member Avatar for newbie14

Whitespace and curly braces are used to determine whether or not you're likely to be posting code. After "Dear XYZ", you type a bunch of spaces on the next line as if you're composing a letter, which due to the indentation is error checked as code. Any code block must …

Member Avatar for newbie14
1
2K
Member Avatar for cynusalisa

There's no good answer to this question without a significant amount of context.

Member Avatar for rubberman
-1
234
Member Avatar for rithish

> scanf("%d",n); Apparently you still don't understand how scanf() works. Allow me to elaborate a bit. Every argument in C is passed by value, which means that a copy of the value of an argument is made and assigned to a temporary variable represented by the corresponding function parameter. So …

Member Avatar for rubberman
0
374
Member Avatar for WaltP

Does it still show as 1 when you empty both your outbox and inbox? That should reset the count as well as remove any orphaned messages.

Member Avatar for Ancient Dragon
0
219
Member Avatar for triumphost

As far as goes, it's unnecessary to micromanage like that. However, I think that given the awkwardness of using iterators here, subscripting is cleaner anyway. Just make sure to check boundaries of *both* vectors.

Member Avatar for deceptikon
0
187
Member Avatar for I_m_rude

`b=0` isn't the only difference, you also added the `for` keyword and an argument list to the macro which assigns i to b and 15 to c instead of expecting b and c to already exist as variables. It's actually a miracle that the original code compiles at all (I …

Member Avatar for I_m_rude
0
210
Member Avatar for lil_bit

> Thank you for at least replying! But, I must say to reply to something without reading is like learning to program without a purpose. Think positive!<3 I carefully read your first post this morning but didn't reply. Does that count? ;)

Member Avatar for Reverend Jim
1
207
Member Avatar for manishanibhwani

> What is the reason behind it... If you lie to printf(), you get what you deserve. When you tell printf() to expect an int, it treats whatever you pass like an int. When you tell printf() to expect a float, it treats whatever you pass like a float. If …

Member Avatar for deceptikon
0
170
Member Avatar for rithish

> no iam asking about sorting now Maybe you should finish learning something before running off to learn something new, because you keep making the same mistakes.

Member Avatar for rithish
0
2K
Member Avatar for laavanya

> One last thing,do we need to learn any other subjects to develop a software other than just the programming language..?? Yes, you need to learn general programming theory and problem solving. The rules of the language are easy to learn, putting them together into a functional, robust, and useful …

Member Avatar for rithish
0
144
Member Avatar for shanki himanshu

strcpy() uses '\0' as the stopping character while memcpy() requires you to specify how many bytes are being copied. memcpy() isn't guaranteed to be safe if the source and destination blocks overlap while memmove() does have that guarantee at the cost of performance. Due to the types involved, the mem\* …

Member Avatar for Ancient Dragon
0
136
Member Avatar for np complete

> My question is when does this function works improperly and why? Technically it works improperly when you call it with an input stream or an update stream in input mode. That is, if you use fopen() with a "w" mode, or a "+" mode and you're currently in the …

Member Avatar for ravenous
1
156
Member Avatar for rithish

> the compiler say the error is at here at 18th line if(ch== '') There's no such thing as an empty character literal, the compiler is telling you that. I can only speculate about what you were trying to do, which is check for the end of a string? In …

Member Avatar for deceptikon
0
151
Member Avatar for shankarz
Member Avatar for techy23

If you're not using Turbo C, you can't use graphics.h. If you're new to game programming I'd recommend writing a few text-based games first, then look for a more modern graphics library. [SDL](http://www.libsdl.org/) and [Allegro](http://alleg.sourceforge.net/) are two names that pop up regularly for starting out.

Member Avatar for I_m_rude
0
1K
Member Avatar for np complete

Try opening windows.h and reading the declarations. Then for each declaration, do a search on MSDN. And here's a tip: MSDN's search facility is an embarrassment of epic proportions, so if you need to do anything but an exact match search, use Google with the `site:` filter.

Member Avatar for np complete
0
267
Member Avatar for Labdabeta
Member Avatar for VernonDozier
0
253
Member Avatar for rithish

> is it possible to write our own display statement and input statement Certainly. How do you think the stuff from stdio.h was written? One cool thing about the standard C library is pretty much all of it can be written directly in C. I've actually implemented the standard C …

Member Avatar for rithish
0
380
Member Avatar for rithish

If you don't bother to read my replies then I'm going to stop trying to help you. How do I know you aren't reading my replies? Because if you were, then you'd realise that I already answered this one with [another post on a similar topic](http://www.daniweb.com/software-development/c/threads/429137/replacing-a-string-in-string#post1837477).

Member Avatar for deceptikon
0
231
Member Avatar for mindhacker

It's not as simple as that, but if you're only using getline() then there should be no need to ignore garbage *if* you're using getline() correctly. The problem of garbage nearly always stems from reading partial lines or mixing getline with formatted input (in the form of the >> operator). …

Member Avatar for deceptikon
0
115
Member Avatar for userIT

I think all of your problems stem from re-opening the file in your functions. Opening a file stream in write mode will truncate the file to zero length, so every time you call print(), the data in the file gets wiped out. One way to fix it without significant changes …

Member Avatar for userIT
0
239
Member Avatar for Tinnin

> int u[]={} You need to give your array a size. I'm surprised there wasn't an error from this definition.

Member Avatar for Tinnin
0
117
Member Avatar for yousafc#
Member Avatar for XodoX

> It's not quite the same. Meaning what, exactly? Are you doing a conversion but not sure your conversion is accurate? Are you getting errors when running it? Unexpected behavior? What's not right that you want fixed?

Member Avatar for XodoX
0
130
Member Avatar for allomeen

[This](http://www.torek.net/torek/c/pa.html) may help. It's written by Chris Torek, who's a man deserving of great respect due to his deep knowledge of C.

Member Avatar for deceptikon
1
852
Member Avatar for pascallavante

The algorithm is correct, though two things stand out: 1. You don't account for a number that's less than 1. In real code this can cause problems. 2. The loop stops when counter is equal to 1, but due to the way the factorial and counter interact, you could stop …

Member Avatar for deceptikon
0
98
Member Avatar for rithish

I don't particularly like how you're trying to lump everything together because it complicates an already complicated algorithm. There are three separate parts to replacing a substring: 1. Find a matching substring. 2. Make room for the replacement. 3. Insert the replacement. Separating the tasks conceptually will help you write …

Member Avatar for deceptikon
0
270
Member Avatar for vijayabhaskar.chowdary

> how to solve Start by trying *something* on your own or asking a specific question. We're not here as a free homework writing service.

Member Avatar for WaltP
-1
91

The End.