3,183 Posted Topics

Member Avatar for VernonDozier

That part of the post doesn't refresh through AJAX, so you'll need to refresh the whole page to see the code highlighting after submitting.

Member Avatar for VernonDozier
0
225
Member Avatar for oscargrower11
Member Avatar for oscargrower11
0
1K
Member Avatar for jp071

In case 1 n is uninitialized, so you're printing whatever random garbage was at that memory location. In case 2 n *is* initialized, but once again foo() doesn't change it, so the value remains 4. In case 3, fooWithRef() *does* change the value of n, so you get the new …

Member Avatar for MandrewP
0
137
Member Avatar for vedro-compota

> how does fprintf() get know - when the list of parameters is ended ? It relies on the format string for this information. That's why nothing bad happens if you provide more arguments than the format string uses, but it's undefined behavior if you provide fewer.

Member Avatar for vedro-compota
0
181
Member Avatar for Valiantangel

#include <iostream> using namespace std; #define PATTERN "-" #define SEPARATOR " " int main() { int row,col,n; cout<<"Enter an Integer number:\n"; cin>> n; cout<<("Numerical Pattern\n"); for ( row = 1 ; row <=n ; row++ ) { for ( col=1; col <= row ; col++ ) { if(col==row) { cout<< …

Member Avatar for deceptikon
0
120
Member Avatar for capton

> In other words are there instances where nodes are specifically needed to be sorted. Yes. Ordering of data is one of the most fundamental tasks. Whether you're using a linked list, an array, or a tree structure, some kind of ordering will be needed in the majority of cases. …

Member Avatar for deceptikon
0
85
Member Avatar for niyasc

I assume you're using a Linux system and not MinGW because MinGW's gcc supports getch(). You can reproduce the effect of getch() on Linux like [url=http://zobayer.blogspot.com/2010/12/getch-getche-in-gccg.html]this[/url].

Member Avatar for jaybhanderi
0
7K
Member Avatar for abhimanipal

There are two versions of iota: an old non-standard version and the standard version added with C++11. I assume you're trying to use the latter, in which case you need to both have a version of GCC that supports that particular part of C++11 *and* turn on the -std=c++0x switch. …

Member Avatar for mike_2000_17
0
2K
Member Avatar for sburks92131
Member Avatar for jbennet

> Is there a way to see the threads by last post first in the new system ? Not presently, but that wouldn't be a difficult feature to add. Can I get a rain check until we clear up some of the post-deployment hiccups? :)

Member Avatar for Airshow
0
2K
Member Avatar for Panathinaikos22

> Does try { } catch make program slower? No. There's a performance hit to actually *throwing* an exception, but if you don't catch it, it'll just propagate up and potentially be unhandled. In the case of exceptions you have no control over such as the standard or third party …

Member Avatar for sknake
0
6K
Member Avatar for NyQii

I'm not sure I understand the difficulty. You already have the login credentials and know if they were legit or not, so it should be trivial to toss the user name into a label: labelLoggedIn.Text = _authenticated ? "Logged In As: " + userName : "Not Logged In";

Member Avatar for SyncMaster170
0
160
Member Avatar for alanso

> hey guys there is a problem with the input file and there is too many bugs........ Wow, that's just soooo informative. Can you elaborate about what the problem is?

Member Avatar for nullptr
0
171
Member Avatar for James19142

> newString.append("//");/*where I actually need doubleslashes */ Do the same thing twice: newString.append("////");/*where I actually need doubleslashes */ The double slash in string literals is an escaping measure because a single slash represents the starter for an escape character. Thus the escape character for a single slash is two: one …

Member Avatar for triumphost
0
1K
Member Avatar for TrustyTony

Unnecessary bumping is frowned upon because bumping sends the last post on page 1 to page 2 (which is tantamount to the kiss of death on Daniweb). But you're correct that there's no rule against it. Legitimate bumping that continues a discussion is fine, though it still annoys certain people. …

Member Avatar for happygeek
0
227
Member Avatar for DavidB

I use Nettalk now that mIRC has tightened up their trial, and it works well for just chatting.

Member Avatar for Dani
0
157
Member Avatar for Dani

This will match the first full line preceded by two newlines and a tab or at least four spaces: ((\n{2})(\t|\s{4,})(.*)) It's broken down into three capture groups: 1. `(\n{2})` finds the leading two newlines. 2. `(\t|\s{4,})` finds the leading tab or spaces. 3. `(.*)` finds the actual content of the …

Member Avatar for Dani
0
765
Member Avatar for ashboi

There problem is exactly as stated. `sequence` is a pointer to char (a dynamic array), so `sequence[i]` produces a single character, not a pointer to a character. I can't say how to fix it because I'm not sure what you're trying to accomplish with that line, but on the assumption …

Member Avatar for scudzilla
0
136
Member Avatar for diafol

I just noticed this as well. Dani has been tweaking the editor and posting process, so something may have gotten through accidentally. I'll take a look.

Member Avatar for diafol
0
165
Member Avatar for nuclear

> Can i start making money, even very little from this? Unlikely. Freelancers are expected to hit the ground running, and if you lack real world experience it'll be even harder finding a gig than a permanent junior position. Sure, you could bid on sites like rentacoder.com, but I wouldn't …

Member Avatar for nuclear
0
286
Member Avatar for Andy90

You'd have to merge the source files manually and rebuild, but what's wrong with having two projects in the solution? You can reference one from the other (there's a `Projects` tab in the add reference dialog) if sharing is necessary.

Member Avatar for thines01
0
100
Member Avatar for jonajonlee

It's really just a customized trim algorithm. Search from the beginning until you find a valid character, then mark that position. Search from the end as well until you find a valid character and mark *that* position. Now you have enough information to extract a substring: #include <iostream> #include <string> …

Member Avatar for deceptikon
0
222
Member Avatar for Ancient Dragon

I've noticed that when pasting code, the editor doesn't maintain the tab level. This is probably a huge contributing factor in people's failure to correctly use code blocks under Markdown. Retaining the starting tab level would fix that particular problem...does CodeMirror support such an option?

Member Avatar for Dani
0
259
Member Avatar for bo0ga

He probably wants you to be familiar with the core .NET framework, and at least one language tied to it, such as C# or VB.NET.

Member Avatar for thines01
0
245
Member Avatar for N1GHTS

Hmm, interesting. Two things to consider since there's some potential funkiness involved. When you call malloc(), make sure that the correct header is included, and also cast the result as C++ doesn't support implicit conversion *from* void*. This is all speculation since I haven't used a Borland compiler in ages, …

Member Avatar for N1GHTS
0
243
Member Avatar for Jakjakjak

Your job would be *vastly* simplified by storing the numbers in an array rather than as separate variables. Then you can sort the array and choose the median with ease.

Member Avatar for Jakjakjak
0
2K
Member Avatar for chaoz014

Your pointer to dynamic memory was corrupted somehow or was otherwise invalid. Usually this is the result of writing outside the boundaries of the requested memory because those areas are often used by the memory manager to store bookkeeping information, and thus they're very fragile. The following stands out as …

Member Avatar for deceptikon
0
1K
Member Avatar for Vasthor

A constructor may only called during a declaration (under normal circumstances), so your code should look like this if you want to reset the `dent_space1` string object: dent_space1 = std::string(max_space, ' '); Or since the object already exists: dent_space1.assign(max_space, ' ');

Member Avatar for deceptikon
0
193
Member Avatar for triumphost
Member Avatar for Sahil89

> All admins, moderators, team colleages are employees or some of them just contribute their time to site. And if they are employees how do you work together? at one place? Any compensation is between the individual and Dani, but to the best of my knowledge the team is mostly …

Member Avatar for Sahil89
0
162
Member Avatar for pendo826
Member Avatar for Begginnerdev

It's not standard Markdown, it's one of the forks with extensions: https://github.com/egil/php-markdown-extra-extended#readme. In particular, the ~~~ syntax is for fenced code blocks.

Member Avatar for Dani
0
295
Member Avatar for glen999

> i need to display the numbers 1 to 9 randomly but they cannot be repeated! Then technically it's not random. ;) There are two ways to get a non-repeating set of random numbers: * Store the generated numbers and try again if you generate one that's already been generated. …

Member Avatar for deceptikon
0
160
Member Avatar for AnnA.A

In your shoes my struct definitions would probably look like this: struct Subject { char name[MAX_SUBJECT]; }; struct Node { struct Subject data; struct Node* prev; struct Node* next; }; struct Queue { struct Node* head; struct Node* tail; int size; } struct Student { int id; char first_name[MAX_FIRST]; char …

Member Avatar for AnnA.A
0
209
Member Avatar for deceptikon

Geeks and conventions go hand in hand, right? ;) Who here plans to go to this year's Dragon*Con in Atlanta?

Member Avatar for deceptikon
-1
89
Member Avatar for Philippe.Lahaie

It was your control panel in vBulletin. The new design is intentionally "plain" because it's only a first version of the system and a simpler design improves both performance and usability. The control panel from vBulletin in particular was excessively complicated and it confused people. Now that we're relatively stable …

Member Avatar for Dani
0
254
Member Avatar for Reverend Jim

Probably a stupid question, but do you have Firefox set up to remember form data in your privacy options?

Member Avatar for Sahil89
0
181
Member Avatar for tabbyheart

> I think the main thing I'm not entirely sure of is how to "cut" the numeric format down and get the last two digits for the "secret message". Use division and remainder math: 19546 / 100 = 195 19546 % 100 = 46 It's easier to keep the numbers …

Member Avatar for deceptikon
0
166
Member Avatar for dheredhere

I know this is for school, but a dedicated matrix object or vector of vectors would be much better in terms of usability and flexibility than a multidimensional array: #include <iomanip> #include <iostream> #include <vector> #include <cstdlib> #include <ctime> using namespace std; typedef vector<int> Row; typedef vector<Row> Matrix; Matrix matrixGenerator(int …

Member Avatar for deceptikon
0
323
Member Avatar for MasterHacker110

> Am I the only one who feels this way? Nope. I'm giving the OP the benefit of the doubt though, because it's possible that this has legitimate uses. However there's a strong chance that it's a very naive attempt at virus propagation logic. > Also, wrong forum. Looks fine …

Member Avatar for mike_2000_17
-1
183
Member Avatar for longlostbro

I have a better challenge: prove that you're not just looking to trick other people into doing your homework for you or I'll find you in violation of Daniweb's rules and act accordingly.

Member Avatar for longlostbro
-1
147
Member Avatar for PuQimX

You neglected to specify what the problem you're having is, but I do have some notes on the code as it stands: > temp1 = (node*)malloc(sizeof(node)); // allocate space for node temp1 = head; You allocate space for a node, then immediately throw away your only reference to it. Not …

Member Avatar for deceptikon
0
227
Member Avatar for Zaqmjua

The concatenation operator for std::string doesn't convert non-string (or character) types to strings. Try this instead: #include <iostream> #include <string> using namespace std; int main() { string s; for (int i=0; i<10000; i++) { s+="1"; for (int j=0; j<i; j++) {s+="0";} } cout << s; }

Member Avatar for deceptikon
0
124
Member Avatar for TheWind147

> when the user input numbers, it should be arranged just like an actual tree If the tree is required to be displayed top-down then you're looking at some form of level order traversal to get the nodes in the proper order for display and a relatively non-trivial algorithm for …

Member Avatar for TheWind147
0
4K
Member Avatar for Labdabeta

`near` and `far` were keywords used to modify pointers back when the segmented memory architecture was both used and transparent. Near pointers would access the current segment while far pointers could reach across segments. Compilers that supported such keywords probably still support them for backward compatibility, but on modern systems …

Member Avatar for Labdabeta
0
123
Member Avatar for Dani
Member Avatar for sasho648

Your functions represent two extremes: 1. Reading and writing character-by-character 2. Reading and writing whole files as a string You can get performance benefits without excessive memory usage by reading and writing the files in blocks. This is a happy medium from the two extremes, look into the read() and …

Member Avatar for sasho648
0
249
Member Avatar for CGorelik

Both are acceptable, but take note that this only applies to when both the declaration and definition are in the same file. Once you start modularizing your files, the accepted format is a header with the declarations, an implementation file, and one or more usage files: ## Header ## #ifndef …

Member Avatar for deceptikon
0
298
Member Avatar for tborchardt

[QUOTE]In your honest opinion, employee, employer, etc., do you think it matters what college one obtains a degree in Information Technology from when it comes to high amounts of competition?[/QUOTE] Realistically, it can matter. Most of the time it only matters that you have a degree, and in IT related …

Member Avatar for loisnees2012
0
232
Member Avatar for pjh-10

With the given information one can only assume a truly random shuffle of a single list of tracks with no other variables involved, so the probability is 1/1000 every time a new track is selected.

Member Avatar for pjh-10
0
442

The End.