3,183 Posted Topics

Member Avatar for yunniesshi

See [this tutorial](http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_hashtable.aspx) for details on writing a hash table. As far as extracting each item in the list for adding to the dictionary, it should be a simple cursor-based traversal: Dict CreateDic(void) { void AddDic(Dict*, student*); LIST cursor; Dict dict; for (cursor = 0; cursor != -1; cursor = …

Member Avatar for deceptikon
0
531
Member Avatar for ProximaC

> Can you please PM me since I can't PM anyone here. You can post though, so do that. It's actually preferred as more people will be able to help when the information is publicly available.

Member Avatar for deceptikon
0
109
Member Avatar for Reverend Jim

> I'm set to invisible, or is that irrelevant? :) If you're invisible then you get no dot. ;)

Member Avatar for Ancient Dragon
0
261
Member Avatar for brock.holman.7

> hey guys so i was thinking of how i would make a program that would state the alphabet from a-z in capitols then the program would change it all to lower case one at a time. And what did think?

Member Avatar for deceptikon
0
130
Member Avatar for unahuche
Member Avatar for ro7_ad

> but the problem is in how do i convert all this data You don't. Pretty much the only C++isms the code uses are in I/O. Replace cin and cout with scanf() and printf() and you're *done* except for minor syntax errors that are trivial to fix.

Member Avatar for NathanOliver
0
452
Member Avatar for niceply
Member Avatar for Octet

> Does anyone have any more experiences that they wouldn't mind sharing? Mine is a cynical view after having been a system administrator *and* working with them in many different companies as a consultant. I typically don't expect sys admins to be experts even in the systems they administer. My …

Member Avatar for deceptikon
0
166
Member Avatar for mattboy64

> are the other languages any easier than c? Depends on which "other" languages you're thinking about, but in general, yes. C is a simple language, but it's not *easy* because it doesn't hold your hand. You need to think about and manage a lot of low level things to …

Member Avatar for mattboy64
0
225
Member Avatar for general2012

> this means the function will exept a pointer and it is a IntPtr type.can you tell me how it is equivalent to a double pointer ??? `IntPtr` is defined as typedef int* IntPtr; The second asterisk is hidden by the typedef, so `IntPtr*` becomes `int**` when evaluated. Your confusion …

Member Avatar for general2012
0
113
Member Avatar for MasterHacker110

The type of file is irrelevant if you're treating it as a sequence of bytes. As long as you don't lose any packets in the transfer, the .exe will be reconstructed correctly and will run on a matching OS.

Member Avatar for Nick Evan
0
338
Member Avatar for a9602

If you have to delete an entry, the simplest method conceptually is to rewrite the file in its entirety without the entry in question. For huge files that can be a performance issue, but for a school project you don't need to concern yourself with huge files.

Member Avatar for a9602
0
182
Member Avatar for mommymac60

> I hope not be booted out for ignorance. No worries, the vast majority of Daniweb consists of people trying to learn more. Ignorance isn't looked down on. > "There's no such thing as a stupid questioin." That's not true in my experience, but we don't hold stupid questions against …

Member Avatar for falkopartey
0
99
Member Avatar for hotelsinger

Welcome aboard! That's my background as well. I started out as a system admin/IT technician to get my foot in the door and then moved to software development with a focus on .NET and C#. Yes, the learning curve is steep, but that's half the fun. ;)

Member Avatar for falkopartey
1
226
Member Avatar for Lisa.Ghiorzi.Rathbun

> I can answer just about any question on any subject given its a question with one factual answer :) What happens after we die? ;)

Member Avatar for falkopartey
0
163
Member Avatar for mattboy64

> You will never use & in printf() unless you plan on printing out raw memory addresses, which you will almost never do. Never say never. ;) printf() supports a %n specifier that assigns the number of characters written up to that point: #include <stdio.h> int main(void) { int n …

Member Avatar for Tumlee
0
184
Member Avatar for Sadhikary

Good luck with that. I hope you realize that you failed to provide enough information for anyone to help you.

Member Avatar for Sadhikary
0
456
Member Avatar for Ernstabenteuer

> I haven't tried windows 8 yet,I can't find a site to download,thanks http://windows.microsoft.com/en-US/windows/buy

Member Avatar for JorgeM
-1
123
Member Avatar for sciwizeh

Without looking at your code (because let's be fair, there's a lot of it), my gut reaction is that you've done something somewhere that corrupted the vector. This is most likely due to an out of range access or wayward pointer. So in troubleshooting I'd focus on memory corruption. Can …

Member Avatar for sciwizeh
0
6K
Member Avatar for klint.austero

Namespace definitions can be split across multiple files and still have the same name, is that what you mean by "shared"? // file1.cpp namespace foo { class A {}; class B {}; } // file2.cpp namespace foo { class C {}; class D {}; } When the project is built, …

Member Avatar for Ancient Dragon
0
127
Member Avatar for nullifyQQ
Member Avatar for mattboy64

> however it says that it is an implicit declaration of function "main" > and that it is invalid in C99 I'm guessing your main is defined like this: main() { ... } That definition uses a feature called "implicit int", wherein if a type is required such as in …

Member Avatar for deceptikon
0
257
Member Avatar for chira.laura.9

Of course, you're always welcome to request that a post be deleted. But be aware that unless it's a flagrant violation of the rules, we're likely to reject the request. On the other hand, if it's a simple matter of removing something like personal information from a post, we're generally …

Member Avatar for deceptikon
0
504
Member Avatar for BigPaw

I try to understand any person I'm communicating with, figure out their native language and country of origin, level of education, perhaps even religious and political beliefs. Only then can I offend them as efficiently as possible. :D

Member Avatar for BigPaw
1
133
Member Avatar for ThatBitchYeah

> if(ch==69||ch==101) > else if(ch==81||ch==113) What do 69 and 101 mean? What do 81 and 113 mean? If you force me to memorize ASCII/Unicode or go to asciitable.com to figure out your code then your code is bad. Use the character literals that correspond to what you want, it makes …

Member Avatar for ThatBitchYeah
0
336
Member Avatar for saurabh.mehta.33234
Member Avatar for Dili1234
Member Avatar for Dili1234
-1
149
Member Avatar for aps1003

This smells like homework where you were given everything except the implementation for perfectShuffle(). As such, I'm going to ask that you prove you've made an honest attempt at completing the assignment. Do you understand how a perfect shuffle works? That's the first step, because you can't tell a computer …

Member Avatar for aps1003
-1
179
Member Avatar for james6754

Holes in your work history are more damning than history in unrelated fields. So yes, add that job.

Member Avatar for mike_2000_17
0
92
Member Avatar for DarWar

Seems simple enough: #include <iostream> class M_48 { static int instances; public: M_48() { std::cout << ++instances << ": Foo!\n"; } }; int M_48::instances = 0; // This is the part you really want int main() { M_48 foo[37]; }

Member Avatar for deceptikon
0
197
Member Avatar for saurabh.mehta.33234

> In the book called gnu c manual I read that the following code has an undefined behavior `i = ++i + 1;` Because since the variable i is modified more than once between the sequence point,it is not sure that what value will 'i' have. That's correct. > But …

Member Avatar for saurabh.mehta.33234
1
117
Member Avatar for mati346
Re: Wifi

...seriously? I mean, come on, did you really think "Help?" would be productive in the slightest? Ask a real question.

Member Avatar for Ritesh_4
-3
29
Member Avatar for john.halbert.37

> it mimics the function system from Windows system() is a standard C/C++ function, it's available on Linux too. ;) You probably knew that, of course, but your choice of phrase could be confusing to less experienced folks.

Member Avatar for john.halbert.37
0
217
Member Avatar for ztdep

`sizefn_t` is a [typedef](http://publib.boulder.ibm.com/infocenter/macxhelp/v6v81/index.jsp?topic=%2Fcom.ibm.vacpp6m.doc%2Flanguage%2Fref%2Fclrc03typdef.htm) for a [pointer to a function](http://publib.boulder.ibm.com/infocenter/comphelp/v7v91/index.jsp?topic=%2Fcom.ibm.vacpp7a.doc%2Flanguage%2Fref%2Fclrc07cplr242.htm). The typedef simplifies the syntax for said pointers because otherwise the syntax is pretty awkward: // Declare a pointer to function and point it to useSizeFace() double (*sizefn)(double*) = userSizeFace; All the typedef does is wrap the awkwardness into a …

Member Avatar for deceptikon
0
117
Member Avatar for animesh

Not to mention it wouldn't pass code review in any development house I've worked with (assuming it compiled). The code itself is brittle and the solution is clearly written by someone who hasn't done much date and time programming.

Member Avatar for deceptikon
0
3K
Member Avatar for christodoulos14

I'd suggest reading each line with fgets() and then parsing it in memory to extract fields. You can do the parsing with sscanf(), though it can get a little tricky unless you guarantee that the file ends with a newline character, because you need to consider fields that end in …

Member Avatar for christodoulos14
0
269
Member Avatar for minipop4747

Just provide a public property in form two that the button click event sets in form one. The setter for the property would invalidate the textbox in form two and cause it to redraw. Easy peasy. And no, I won't give you the code for it because this is clearly …

Member Avatar for ChrisHunter
0
175
Member Avatar for saurabh.mehta.33234

> for example by adding \" it interprates " as a string then why cannot we use \ in our case? Because escape characters are interpreted at the compiler level and format specifiers are interpreted at the library level. If `\%` gave you a literal `'%'` then it would still …

Member Avatar for Gonbe
0
157
Member Avatar for new_developer

> I have found the solution in other websites that we have to clear the buffer and use cin.ingnore(). Does anyone tell me what does it means ?? cin.ignore() reads and discards characters. `cin.ignore(80, '\n')` is roughly equivalent to this loop: { char ch; for (int i = 0; i …

Member Avatar for deceptikon
0
1K
Member Avatar for <M/>

> Is there a way to change your avatar into an animated avatar? No. When you upload an avatar, we resize it internally to ensure that it's 80x80, and the method we use to do that only returns the first frame of an animated image. > I have seen a …

Member Avatar for Reverend Jim
0
336
Member Avatar for you207

> int *sum=0; `sum` is a pointer yet you use it as an integer. It shouldn't be a pointer in this case.

Member Avatar for deceptikon
0
330
Member Avatar for kw42chan

> Any incorrect or improvement needed? It's completely broken. I'm fairly confident you didn't attempt to compile that code, much less run it.

Member Avatar for deceptikon
-1
259
Member Avatar for vikuseth

When you forward declare a class, you only tell the compiler that it exists, not what's in it. So while the declarations are fine, the definition of FileTwo::Test() would need to be deferred until after both classes have been introduced completely: class FileOne; class FileTwo { public: int Test(FileOne One); …

Member Avatar for vikuseth
0
207
Member Avatar for saurabh.mehta.33234

GCC doesn't support void main, therefore any use of it invokes undefined behavior. More specifically, if the compiler doesn't support void main then the code it produces could be [very wrong or dangerous](http://users.aber.ac.uk/auj/voidmain.cgi).

Member Avatar for deceptikon
0
47
Member Avatar for DeanMSands3

While I don't disagree that VBA is missing a solid home, I'm not convinced that we need to add a new forum when VBA threads can be tagged as such and placed in a forum that's "close enough" and likely to be seen by fellow VBA peeps.

Member Avatar for diafol
0
147
Member Avatar for abed.arb

> The problem is that it's my first project of its kind and i don't know how to start also the defregmant part is a bit tricky So you haven't been given any projects in the entire course? This is the *final* project, which means you can't play the clueless …

Member Avatar for Lucaci Andrew
0
174
Member Avatar for myk45

An example is mentioned specifically in the form of prepending size information to the block of memory. If the object is small, the overhead of size information can be prohibitive. It's only when the allocated objects get bigger that the "bookkeeping" information gets amortized away.

Member Avatar for jjl.
0
220
Member Avatar for monching

You can use negative values in the Add\*() methods to represent subtraction from the current value: datetime.AddSeconds(-1) ' Decrement by one second

Member Avatar for monching
0
768
Member Avatar for kw42chan

> A function prototype is also called a function declaration. You supplied a function definition. A definition is also a declaration, but a declaration is not always a prototype. A prototype is the very specific declaration without a body that defines parameters (excluding the case of an empty parameter list), …

Member Avatar for kw42chan
0
411
Member Avatar for MutanaIK

A hardware barcode reader will give you the contents of the barcode, so there's nothing barcode specific you need to do in your program. Just accept standard input as if it came from a keyboard.

Member Avatar for tinstaafl
0
172

The End.