3,183 Posted Topics

Member Avatar for khevz.sandaan

Is this a separate application or just another form in your program? If it's the latter then you can do what you want with an [MDI setup](http://www.codeproject.com/Articles/3553/Introduction-to-MDI-Forms-with-C). If it's the former then I'm not going to say you *can't* do it, but the concept is like saying "I want to …

Member Avatar for deceptikon
0
546
Member Avatar for deceptikon

I've needed to write sample code using conio.h over the years, but my compilers don't support all of it (most notable being clrscr() and gotoxy()). So I wrote a conio simulator class to help me. Not all of the conio.h functions are present, such as cgets() and cscanf(), because I …

2
1K
Member Avatar for Hey90

> What are the advantages of overloading the stream extraction operator to read data from a file? Among other things: * It saves the user of the class a lot of trouble in customizing I/O. * It saves you from having to design individual access to data members. * It's …

Member Avatar for deceptikon
0
439
Member Avatar for Kewne

> is it going to be possible to have a connection if I create a J2ME (netbeans) as client and vb.net (2010) as the server? Provided they both use a compatible connection method, yes. In some cases you might also need to massage the data to and from what the …

Member Avatar for Kewne
0
231
Member Avatar for davy_yg

> Does it really makes the process of programming faster? That's debatable. Especially with CodeIgniter, I'm not sure it makes things faster aside from offering a bunch of libraries that save you the trouble of reinventing the wheel. But I'm not convinced that the boilerplate of a framework is any …

Member Avatar for mrleewood
0
248
Member Avatar for ImZick

> so that the code will be something like this i think? Close. You forgot to close the two strings: Dim da As New OleDbDataAdapter("Select * from [" & Sheet1_EBU & "]", con)

Member Avatar for deceptikon
0
150
Member Avatar for violetlyn.sumayo

Are you physically drawing text onto the image or just overlaying text on the image at display time? The former will require some type of image processing library while the latter can be done with straight HTML/CSS assuming you have both the image and text available.

Member Avatar for Bachu
0
578
Member Avatar for emmanuell

"System" is pretty vague. Have your studies focused on anything in particular? Do you have any interests that might suggest a possible project?

Member Avatar for joshfizzle
0
117
Member Avatar for garyjohnson

The answer is a definite maybe. As far as being effective, if it's not effective then it's not a viable solution because it doesn't work. So there's not really any degree here, it either works for your needs or it doesn't. Whether it's the most efficient way really depends on …

Member Avatar for diafol
0
162
Member Avatar for Duki

[This](http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_sorting.aspx#radix) page goes into a little more detail for the same basic algorithm. It might help.

Member Avatar for deceptikon
0
316
Member Avatar for Hey90

The only difference between `struct` and `class` in C++ is default visibility. Structures are public by default and classes are private. Other than that they're identical in features and functionality. Use whichever makes more sense to you.

Member Avatar for Hey90
0
627
Member Avatar for daryl_1201

"It's not working" is completely useless. Describe how it's not working if you want better help. But I'll point out some obvious flaws in the code: > `for (int i = 5 < = 100; 1 + = 5){` This line is all borked up. A for loop has three …

Member Avatar for stultuske
0
228
Member Avatar for group256

> I believe the entire code is correct, but only the way I call the push and pop function mighe be wrong. Actually, a lot of the code is incorrect, but subtly so. The way you're using `void*` isn't quite right (note that `void**` doesn't do what you probably think …

Member Avatar for deceptikon
0
285
Member Avatar for nah094020

> After calling getchar() you need to clear the keyboard buffer of all remaining keys. Unfortunately there is no standard way of doing that. Well, there's a standard method, but it's situational in that there must be at least one character pending in the stream if you don't want to …

Member Avatar for Ancient Dragon
0
157
Member Avatar for sumitrapaul123

> But not getting how to write. As Momerath mentioned, you need to consider whether the class *needs* to implement IDisposable in the first place. If it doesn't, there's no need to complicate the code by doing so. As for how to have a reusable disposal pattern without manually implementing …

Member Avatar for deceptikon
0
128
Member Avatar for lewashby

> In the following program You forgot to include the following program. > What do the mean by that? It means what it says. C++ doesn't stop you from walking off the end of an array: int a[4]; // Don't do this for (int i = 0; i < 100; …

Member Avatar for vmanes
0
77
Member Avatar for lewashby

> How can I grow the size of a char array? That's easy, you can't. Arrays are statically sized and never change. If you want a dynamic array, you'll need to either *simulate* an array using pointers and dynamic allocation, or switch to a class that does it for you …

Member Avatar for 9tontruck
0
155
Member Avatar for FearlessHornet

You didn't provide enough code. Can you post a brief but *complete* program that exhibits the problem?

Member Avatar for mrnutty
0
228
Member Avatar for Nutster

Let's start with your assumption about the formatting of a numeric value, which isn't safe these days. Consider the following function that's designed to be locale-friendly for the same task: #include <ctype.h> #include <locale.h> #include <math.h> #include <string.h> char *dtoa(char buf[], double value, int precision, int show_sign) { char *grouping …

Member Avatar for Nutster
0
350
Member Avatar for Hey90

Sorry, but if you want to use qsort() then the comparision functions must either be static members or non-members. A pointer to a member function means something quite different than a pointer to a static member function or non-member function, and because of this they're incompatible. The good news is …

Member Avatar for Hey90
0
4K
Member Avatar for anumash

> can anyone mention what I can do to make this program more efficient? This is a case where I'd say you have no reason to worry about efficiency. > My problem is that I want to print only that string which is meaningful and not the garbage values. How …

Member Avatar for deceptikon
0
106
Member Avatar for ChrisHunter

Those folder icons tell you the read status of the forum. When you click on the folder, it makes the forum as read, it's not supposed to navigate you to that forum. If you want to *go* to the forum, click on the name of it instead of the folder …

Member Avatar for ChrisHunter
0
146
Member Avatar for can-mohan

> but i believe in case of without copy constructor it must have printed same memory address due shallow copy That's not the case because you aren't printing the address contained by the pointer, you're printing the address of the object that owns the pointer. Change your show() method to …

Member Avatar for deceptikon
0
192
Member Avatar for akhilchandranms

> actually turbo c/c++ is no more upadated, as borland closed the project. so it don't support the ANSI C features, System() function is the part of ansi c. Turbo C/C++ is an ancient compiler for an outdated operating system, but it still supports C89 well enough that the system() …

Member Avatar for deceptikon
0
1K
Member Avatar for millus

Clear your parameters collection when the values change, you're doubling them up and the variable name is a unique key: while (readerReference.Read()) { cmd_Insert.Parameters.Clear(); cmd_Insert.Parameters.AddWithValue("@emp_login", readerReference.GetInt32(loginIndex)); cmd_Insert.Parameters.AddWithValue("@emp_dom_code", readerReference.GetInt32(DomCodeLoginIndex)); cmd_Insert.Parameters.AddWithValue("@emp_domain", readerReference.GetString(dom_domain)); cmd_Insert.Parameters.AddWithValue("@emp_surname", readerReference.GetString(emp_surname)); cmd_Insert.ExecuteNonQuery(); }

Member Avatar for ChrisHunter
0
179
Member Avatar for uurcnyldrm
Member Avatar for lewashby

Test it out and see: #include <iostream> using namespace std; int main() { cout << "'"; cout << "foo"; cout << "'\n"; cout << "'"; cout.width(10); cout << "bar"; cout << "'\n"; cout << "'"; cout.width(10); cout.setf(ios::left); cout << "baz"; cout << "'\n"; } As for where to figure these …

Member Avatar for lewashby
0
248
Member Avatar for stephgoesshazoo

> So, I'm suppose to make a program following these guidelines. Good luck with that.

Member Avatar for deceptikon
0
425
Member Avatar for killer88

The conversion between a string and double isn't implicit. Try calling [Convert.ToDouble()](http://msdn.microsoft.com/en-us/library/zh1hkw6k.aspx).

Member Avatar for tinstaafl
0
1K
Member Avatar for samii1017

I'd use an array where the index represents the horse and the value stored at that index is the number of wins: int wins[9] = {0}; // Simulate 100 races with each horse having equal probability of winning for (int i = 0; i < 100; i++) { ++wins[rand() % …

Member Avatar for deceptikon
0
115
Member Avatar for kshahnazari

> a = here*; This isn't valid syntax. > and in the function I check if here is NULL or not You're not checking if `here` is NULL, you're checking if `here->key` is NULL. `here->key` is a char, so the test is nonsensical given that one of the operands is …

Member Avatar for deceptikon
0
140
Member Avatar for anumash

> I was wondering how the compiler searches for a file using just the name of the particular file. Typically, a relative path will behave as if the current working directory were prepended. For example, on Windows `"file.txt"` would be treated as if it were `"%cd%\file.txt"`. > If I have …

Member Avatar for anumash
0
164
Member Avatar for sumitrapaul123

Hmm, seems awkward. I'd probably start by trying something like this: private bool _addingItem = false; private void comboBox_SelectionChangeCommitted(object sender, EventArgs e) { var ctrl = sender as ComboBox; if (ctrl.SelectedItem.ToString() == "Add") { _addingItem = true; ctrl.Focus(); } } private void comboBox_KeyDown(object sender, KeyEventArgs e) { if (!_addingItem) { …

Member Avatar for deceptikon
0
320
Member Avatar for Ancient Dragon

The filtered words list can be a little funky. IIRC, the weirdness comes from Dani's analysis of words that are most likely to be used in an insulting manner towards another person. Given that we already require members to be at least 13 years of age, I'd prefer no automatic …

Member Avatar for Reverend Jim
0
179
Member Avatar for feedo1969

> My question is what [100] in the first line of the Pseudocode stands for? It's the size of an [array](http://en.wikipedia.org/wiki/Array_data_type).

Member Avatar for feedo1969
0
109
Member Avatar for IsaacMessi10
Member Avatar for Ancient Dragon

If the type is unknown, try using Object^. Provided you're working with CLI types, they're all derived from Object.

Member Avatar for triumphost
1
687
Member Avatar for yossi.hazan.5

For starters, movie_rent is neither an object nor an array, it's a type. The object declaration would be more correct like this: struct { char name[20]; char year[20]; int inout[20]; } movie_rent[20]; But that doesn't fix your syntax issues because you can't seem to decide if movie_rent is an array …

Member Avatar for yossi.hazan.5
0
118
Member Avatar for daniel36
Member Avatar for daniel36
0
137
Member Avatar for somjit{}

Your findMin() has two problems, one is a bug and another is a usability problem. The bug is that you're moving the pointer ahead by `j` steps on *every* recursive call, but you're also using `j` as an index into the array. This is basically a guaranteed access out of …

Member Avatar for somjit{}
0
362
Member Avatar for achinthaadd
Member Avatar for achinthaadd
0
284
Member Avatar for aVar++

[GIMP](http://www.gimp.org/) is the open source equivalent to Photoshop, but don't expect it to be as user friendly. I'm not familiar with the latest HTML packages. try searching Google. I use NetBeans if you're interested, though it's more of an IDE for PHP than a website designer like Dreamweaver.

Member Avatar for <M/>
0
128
Member Avatar for neoanomally

> I was thinking of creating a class that stores all relevant data but I dont know if that would make it less efficient Here's a novel idea: try it and see what happens. Then you'll know after teaching yourself through experience. ;)

Member Avatar for neoanomally
0
179
Member Avatar for phorce

> how difficult would it be to have a .lib and a .dll file so I can work with both Linux/Unix and Windows? You'd have two builds for the two systems. Whether the actual code that gets built needs to be ported to support the different systems depends on what …

Member Avatar for phorce
0
358
Member Avatar for TonyG_cyprus

> Download a reference manual and use it is my advice. That's too much work when they can just post their problem to umpteen forums with the expectation that some kind soul will do it for them. > I'm not an IT professional, I'm a hobbyist, and I've learned all …

Member Avatar for mike_2000_17
2
112
Member Avatar for VernonDozier

> Anyone know how to do it that way? Unless you feel like dropping down to inline assembly, the best (only) solution is to verify that the operation won't overflow *before* you perform it.

Member Avatar for deceptikon
0
176
Member Avatar for NagyAndor1995

Your query failed for some reason. I notice you didn't provide a connection as the second argument to mysql_query(), have you opened a connection to the database already?

Member Avatar for NagyAndor1995
0
330
Member Avatar for illuss

> Please help? What am I doing wrong? You're not closing `binaryNum` as a string, so garbage gets copied into `immeStr`. Change the definition to this for a simple solution: char binaryNum[bit+1] = {0};

Member Avatar for deceptikon
0
165
Member Avatar for raj REDDY

I would ask a few questions: 1. *"31 32 33..... til end of file"*. What does end of file mean here? Are you reading input from a file? Are you just printing numbers until the user tells you to stop? The behavior isn't obvious here, so writing code for it …

Member Avatar for raj REDDY
0
201
Member Avatar for totalwar235

> `*bushels[i] = *(bushels[i]*price);` The indexing operator already dereferences the pointer, what you're trying to do is dereference a float value, which clearly won't work. Try this instead: bushels[i] = bushels[i] * price; Or using the compound operator: bushels[i] *= price;

Member Avatar for deceptikon
0
128

The End.