3,183 Posted Topics

Member Avatar for andrian.mutua.7

> I have unfortunately installed a fake copy of xp Then unfortunately you should uninstall the pirated copy, buy a legit copy, and install that. > the microsoft co-operation has tracked it and the screen display has turned upside down That's utterly ridiculous. I don't doubt that you've accidentally hit …

Member Avatar for deceptikon
0
465
Member Avatar for antor
Member Avatar for diafol

> Anybody got any views on this? Is common civility something to be shunned in order to avoid offence? I was raised to be polite and courteous to all, women and men regardless of age. If someone is offended by that, it's not my problem. If a woman gets offended …

Member Avatar for Reverend Jim
2
1K
Member Avatar for ashish2expert

> i have not defined <stdlib.h> header and included rand() function and it works without this header. How? If you don't declare a function before using it, the compiler will assume that it's an external function accepting an unknown number of arguments and returning int. If those assumptions hold true, …

Member Avatar for vegaseat
0
525
Member Avatar for WarrenG.27

You're trying to concatenate to a variable that was never truly given an initial value. Somewhere before the first concatenation, add this: $topic = '';

Member Avatar for WarrenG.27
0
413
Member Avatar for TonyG_cyprus

> I'm not able to duplicate this. Zoom out by one tick (hold down ctrl then hit '-'). It happens in Chrome and Firefox, but not Opera or IE.

Member Avatar for TonyG_cyprus
0
123
Member Avatar for MiTiM

Your push_in_tree() function has no way of telling the caller what changed. Consider this: EL *push_in_tree(EL *new_ptr, EL *root) { if (root == NULL) { root = new_ptr; } else if (new_ptr->id < root->id) { root->left = push_in_tree(new_ptr, root->left); } else { root->right = push_in_tree(new_ptr, root->right); } return root; } …

Member Avatar for MiTiM
0
310
Member Avatar for krul.ezanie

> its ok u cant help. It's not a matter of "can't". We *won't* help when you're looking for a handout. The sad part is that not only did you steal the posted code to trick people into believing you did *any* work (which you clearly did not), you stole …

Member Avatar for deceptikon
-1
362
Member Avatar for aazamsajid

My educated guess is that you're using Turbo C to run this program. Turbo C's int is 2 bytes rather than 4, so 34545666 is *waaay* out of range. Use a long int instead of int to ensure that the code works even on ancient compilers or compilers that target …

Member Avatar for deceptikon
0
155
Member Avatar for isrinc
Member Avatar for aVar++

for i in range(0, n): List.append(random.randint(0,1000)) return (List) This generates one number, appends that one number, and returns immediately on the first iteration of the loop. You need to move the return statement outside of the loop: for i in range(0, n): List.append(random.randint(0,1000)) return (List)

Member Avatar for vegaseat
0
420
Member Avatar for terence193

> However java does not seem to allow 2 returns in the same method That's not correct. > and considers the following code as not having a return statement. This *is* correct. Not all paths end in a return statement, so your compiler is complaining. You have a return for …

Member Avatar for deceptikon
0
183
Member Avatar for rchrist3
Member Avatar for rchrist3
0
782
Member Avatar for anandhakrishna

> `fp1=fopen("**********.CPP.SAVE","w"); ` This is a little confusing, are you trying to use wildcards or placeholders to pick up any file matching that pattern? If so, fopen() doesn't do that. *If* it happens, that would be an extension provided by your compiler that you need to confirm rather than asking …

Member Avatar for totalwar235
0
290
Member Avatar for Melly3

strcmp() returns a comparison, not equality. If the result is 0, the two strings match. If the result is less than 0 the first string is lexicographically smaller, and if the result is greater than 0 the first string is lexicographically larger. So your test should look like this: if …

Member Avatar for deceptikon
0
253
Member Avatar for jjslama

> method expects address of the variable/ pointer varible instead of passsing value of the variable while calling the method > but you called this method by passing the value directly so that is the reason you got skipping over the function call That's a good guess, but you're wrong. …

Member Avatar for jjslama
0
113
Member Avatar for Sonia11

It's very difficult to suggest anything useful due to the incredibly vague nature of the question and lack of code.

Member Avatar for deceptikon
0
106
Member Avatar for lewashby

> I was also told to stay away from classes completly until he's ready for me to move in that direction. That sounds like the kind of thing a teacher who's only a step or two ahead of you in the learning process would say to avoid being embarrassed.

Member Avatar for mike_2000_17
0
423
Member Avatar for riahc3

Where are you storing the information and what are you planning on doing with it? How you store it will change depending on what your needs are in terms of how the data is used. > Basically that; Im thinking about a 3 demensional array. Would this be correct? Unless …

Member Avatar for diafol
0
518
Member Avatar for sobias

> how exactly I write that there is 2 parameters should be entered by the member? or just click the search button? I'd break the logic down like this: If NOT empty(course_id) search_exact(course_id) Else If NOT empty(course_name) search_fuzzy(course_name) Else list_all() If there's a course ID, it's safe to assume that …

Member Avatar for sobias
0
602
Member Avatar for Mariann

> What should i do to handle this exception. Don't cause it in the first place. If values can be null, be sure to check for null when doing things like output and use a safe alternative.

Member Avatar for ddanbe
0
236
Member Avatar for MRehanQadri

The logical OR (`||`) and bitwise OR (`|`) are also subtly different. Sometimes you'll get the same result and sometimes you'll be surprised, so I'd recommend not using the bitwise OR in situations where you clearly want a logical OR. This is one of those situations, so your test should …

Member Avatar for MRehanQadri
0
687
Member Avatar for archie.herbias

Any motherboard will support Windows Vista. All of those stickers saying "Vista Compatible" or "Vista Ready" are just marketing BS. The components you need to ensure are up to spec are the CPU, the video card, hard drive size, and the amount of RAM. Those are all listed under the …

Member Avatar for mjdodd
0
258
Member Avatar for hg_fs2002

> When a simple-escape-sequence like '\n' is evaluated, what would be the result? It's evaluated as the platform-dependent character for a newline. For example, on Linux '\n' will be evaluated as LF (ASCII 10) while on Windows it'll be evaluated as CRLF (ASCII 13 + ASCII 10). But it's totally …

Member Avatar for deceptikon
0
227
Member Avatar for mrnutty

As an avid avatar junkie, why would you want to have the same avatar on different forums? ;) Just kidding, it's a nice idea. I'd actually never heard of Gravatar though, so I'd have to look into it. There's also the niggling worry about using plugins to off-site storage that …

Member Avatar for mrnutty
0
231
Member Avatar for cisumma

> I have yet to effectively use these expressions. It's fairly straightforward when compared with an if..else statement. This: x = (condition) ? foo : bar; Becomes this: if (condition) { x = foo; } else { x = bar; } IF you don't need to make an assignment and …

Member Avatar for deceptikon
0
164
Member Avatar for onkarpathak833

Even if what you want was trivial enough to post in a reply (it's not, by the way), we don't give homework help without proof of effort. Please read our rules, [definitely read this](http://www.catb.org/esr/faqs/smart-questions.html), and try again.

Member Avatar for deceptikon
-1
83
Member Avatar for FelineHazard

It really depends somewhat on how you declare your pointer. For example, a static or global pointer will be default initialized to null. A local pointer will contain random garbage if not explicitly initialized, just like any other local variable. Best practice is to initialize your variables in all cases …

Member Avatar for FelineHazard
0
791
Member Avatar for deceptikon

The annoying use case is this: for (vector<int>::size_type i = 0; i < v.size(); i++) { cout << v[i] << ' '; if (i == v.size() - 1) { cout << endl; } } C++11 offers the `auto` keyword for initializer type deduction so that we can avoid verbose and …

5
320
Member Avatar for sundog1

Quote your string in the SQL statement: string OrdersLine50CustomerSQL = "SELECT cashID, cashQTY, cashDescription, cashSupplier, cashDate, cashCost, cashSell, accAccRef_FKID from cashOrders WHERE cashOrders.accAccRef_FKID = '" + CustomerID.ToString() + "'";

Member Avatar for sundog1
0
170
Member Avatar for cyberdaemon

I'm not sure I understand the requirement. You want to clear the Excel workbook *before* uploading it to the database? That sounds like a no-op, since the upload on an empty file will do nothing. Perhaps you mean clear the file *after* uploading? But if that's the case, why not …

Member Avatar for cyberdaemon
0
391
Member Avatar for 2mhzbrain

You haven't provided enough information. What kind of data? Who needs access to the data? How is the data accessed? How much of it needs to be accessible at any given time? What does "large amount" really mean? Is this online hosting service just for storage (such as a cloud …

Member Avatar for drjohn
0
418
Member Avatar for lewashby

> So in the following code, is message an array because it doesn't really look like one? Yes. The string literal is actually stored as and has a type of **array to const char**. When used in value context it evaluates to a pointer to the first element, which is …

Member Avatar for lewashby
0
246
Member Avatar for Rahul47

Define a property in Form2 that will hold that string, then assign to it and refresh()/invalidate() the control in Form2 whenever you want (ex. in the validated event of the textbox in Form1). For example, in Form2: public string MyText { get { return textBox1.Text; } set { textBox1.Text = …

Member Avatar for azareth
0
351
Member Avatar for sarah.mathieson.7

> file_to_check.close(); That's not necessary. If the file is open, the destructor for ifstream will close it.

Member Avatar for vmanes
0
3K
Member Avatar for microlifecc

Have you considered running Fedora in a VM? If all you need is a \*nix system for the shell programming class, that strikes me as the better option than completely wiping your laptop and installing an OS that you may not use for longer than a few months.

Member Avatar for microlifecc
1
296
Member Avatar for kamilacbe

I'm assuming that clever replacements for string.Split() are off the table too. Try looping over the characters in the string and print a newline when you reach whitespace: foreach (char c in s) { if (!char.IsWhiteSpace(c)) { Console.Write(c); } else { Console.WriteLine(); } } That's the simplest approach, but it …

Member Avatar for kamilacbe
0
188
Member Avatar for cerealBoxx

Falling off the end of a function doesn't return anything meaningful. What you want is to return the result of the recursion (see line 13): public static bool FindTarget(int target, int[] arr, int index) { if (index >= arr.Length-1) { return false; } if (arr[index] == target) { return true; …

Member Avatar for aaa_78600
0
547
Member Avatar for numbplum

> It needs to print out signBit, expBit, and fracBits. What, pray tell, are expBit and fracBits supposed to represent for an integer?

Member Avatar for deceptikon
0
294
Member Avatar for A Haunted Army

> 1) Leave the explanation of what a function does outside the function, and the comments about how it is done inside the function, near the code that does it. I'd go even further (since I'm a sparse commenter) and say that comments should be limited to the following (examples …

Member Avatar for A Haunted Army
3
265
Member Avatar for DavidB
Member Avatar for dan.gerald
Member Avatar for deceptikon
0
191
Member Avatar for ConfusedLearner

Why do you keep starting new threads for the same program? Please stick to one thread unless the questions are wildly different.

Member Avatar for deceptikon
0
115
Member Avatar for AquaNut

> Yup, but that implies I have to convert it from a date format to a string then convert it back. Nope, you just need to convert it to a string since you already have a valid DateTime object: string formattedDate = dateOfBirthUpdate.DateOfBirth.ToString("yyyy-MM-dd");

Member Avatar for ChrisHunter
0
220
Member Avatar for quiggles

> I would like to write a little program that is a little floating window, that can be viewed on both the "Metro" screen and on the desktop, is this possible? As I understand, Metro doesn't support any kind of windowing system that would give you something "floating", it's all …

Member Avatar for deceptikon
0
102
Member Avatar for ConfusedLearner

> My program runs but I feel like it is missing something else. Yes, you're missing the subroutine. Declaring a function is only half of process, you also need to define the function and tell it how it works: #include <iostream> using namespace std; // Declaration: Tells the compiler how …

Member Avatar for deceptikon
0
81
Member Avatar for chandnigandhi

> so how connectivity of oracle is possible with c++? Start by googling for an oracle database library that supports your old as dirt compiler. Then read the documentation and tutorials for that library, and you'll be in a much better position to do your project.

Member Avatar for deceptikon
0
71
Member Avatar for canniemar

Actually, Daniweb supports both changing of names (it's a one time change per account) *and* deleting of accounts. Either of those can be done from [here](http://www.daniweb.com/members/edit_membership).

Member Avatar for TnTinMN
0
153
Member Avatar for elijah.gallien

The == operator is used for comparison, it's different from the = operator which is used for assignment. Also, it may seem confusing at first, but you *don't* end the line of an `if` statement with a semicolon. It's legal, but doesn't do what you want. Simple statements *do* end …

Member Avatar for deceptikon
0
104
Member Avatar for garyjohnson

Try using a regular expression to replace multiple instances of CRLF and newline with a single instance. You probably also want to consider including break tags: // Squeeze break tags $comment = preg_replace('/(<br\s*\/>)+/', '<br />', $comment); // Squeeze CRLF $comment = preg_replace('/(\r\n)+/', '\r\n', $comment); // Squeeze NL $comment = preg_replace('/(\n)+/', …

Member Avatar for garyjohnson
0
2K

The End.