3,183 Posted Topics

Member Avatar for sruthi atluri

I think that's quite enough of the "me too" joke offerings to do it for money.

Member Avatar for nitin1
0
136
Member Avatar for equation

> The exact same way you do there. Wait. You're saying that the syntax and semantics of loops *don't* change from function definition to function definition? That's just crazy talk. ;p

Member Avatar for nitin1
0
174
Member Avatar for bobejoe

What's your definition of "cool"? And why do you want such a program?

Member Avatar for bobejoe
0
109
Member Avatar for ctclements

I'm willing to be that `count` and `totalwords` are both int too, which means your division is performed in integer context. If the division results in a value less than zero, the precision is ignored and the result will be 0. You want something more like this: int wordpercent = …

Member Avatar for ctclements
0
207
Member Avatar for Alexkid

I find it odd that the implementation supports streams yet not completely. If the hardware couldn't handle stream behavior (presumably this is an embedded platform) then excluding that part of the library entirely would be expected. Rather, I don't recall any clauses in the ISO standard that say tellg() may …

Member Avatar for vijayan121
0
756
Member Avatar for triumphost

> Is this true or can I actually do this in C++? One of the reasons why this is reasonable in Java is the lack of default arguments. In C++ you can do it all with one constructor: Rectangle(int width = 0, int height = 0, int x = 0, …

Member Avatar for mike_2000_17
0
493
Member Avatar for sss93

The choice and reason are both trivial: pick the language you're most comfortable with, because it's easier to stand up a working project quickly when you're not fighting with your tools.

Member Avatar for deceptikon
0
184
Member Avatar for Aska o.

> Clear yet? With one post 2 years ago asking for other people to do their thinking for them, I'm willing to bet that the OP has long since failed. ;)

Member Avatar for deceptikon
-1
451
Member Avatar for soujanya.bhat.184

> Plz tell me where i am going wrong.. Start with the fact that you're double incrementing both `ptr` and `i`. Note how the increment clause of the for loop increments both of them, but in all other paths of execution in the body you still increment both of them. …

Member Avatar for soujanya.bhat.184
0
171
Member Avatar for zelesi.chafilwa

You forgot to give us your teacher's email address so that we can submit your homework after we've done it. :rolleyes:

Member Avatar for Michael27
-1
121
Member Avatar for straylight

> I am attempting to find a pivot point in a sorted array for example { 1 2 4 5 9 } might become { 5 9 1 2 4 }. That seems simple enough. The array is already sorted, so just start swapping everything from the median: for (int …

Member Avatar for deceptikon
0
593
Member Avatar for mann_cool36
Member Avatar for israruval007

Have you read the documentation for the XmlDocument class? It has methods for doing everything you want.

Member Avatar for israruval007
0
403
Member Avatar for deceptikon

Encoding and decoding functions for RFC 4648 compliant base-64. The code is written in standard conforming C11 and backward compatible with C99 (pre-C99 is *not* supported without code changes).

Member Avatar for deceptikon
0
345
Member Avatar for volkang

> The problem is that there are too many open files. That's indicative of a design flaw. You can check the value of FOPEN_MAX (defined in stdio.h), and it's probably rather large for your implementation. If you exceed that value, you probably need to consider why you have so many …

Member Avatar for volkang
0
352
Member Avatar for Suzie999

The using directive pulls in *every* visible name from the namespace while the namespace qualified name is visible only for that single use of only that name. Obviously if your goal is to avoid naming collisions in multiple namespaces, a using directive is the worst possible choice and a qualified …

Member Avatar for vijayan121
0
257
Member Avatar for Ahmed Sarwat

The download you're looking for is mingw-w64-v2.0.6.tar.gz, [here](http://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/). It looks like MinGW-64 is distributed as a gzipped tarball and there's not a Windows installer, so you'll need to extract it. I use WinRAR to handle extraction of gzipped tarballs, you may consider that too. Once the package is extracted (note …

Member Avatar for deceptikon
0
1K
Member Avatar for Nomi55

Unless you're forced by a very backward teaching institution to use Turbo C, or you're maintaining legacy code that *must* be compiled using Turbo C, GCC (a recent version) is very clearly better.

Member Avatar for Nomi55
0
260
Member Avatar for nitin1

The forum you're looking for is called [Computer Science](http://www.daniweb.com/software-development/computer-science/14).

Member Avatar for nitin1
0
165
Member Avatar for nitin1
Member Avatar for Faiza akmal

Someone asked this [exact question](http://www.daniweb.com/software-development/c/threads/433727/about-compiler) today. Was it you? :P

Member Avatar for nitin1
0
102
Member Avatar for Jaypie
Member Avatar for modesto916

For example using [Wikipedia's](http://en.wikipedia.org/wiki/Tree_traversal) traversal result (F, B, A, D, C, E, G, I, H), the execution logic might go like this: F, B, A, D, C, E, G, I, H ^ F, B, A, D, C, E, G, I, H ^ ^ F, B, A, D, C, E, G, …

Member Avatar for deceptikon
0
202
Member Avatar for I_m_rude

> but when you come to know that he dont have any worth of you and even laugh when you show respect to them, then that is a pathetic situaion. what about this ? You take it up privately with him instead of [airing your dirty laundry](http://www.usingenglish.com/reference/idioms/air+your+dirty+laundry+in+public.html). And if what …

Member Avatar for nitin1
0
315
Member Avatar for Sasquadge

The last two loops should be nested: for (int middle = 0; middle < 0.5 * height; middle++) { for (int middle = 0; middle < height - 1; middle++) cout << ' '; cout << '|'<< '|' << endl; }

Member Avatar for Sasquadge
0
119
Member Avatar for satishchavan170

[inheritance](http://dictionary.reference.com/browse/inheritance) (n): 1. something that is or may be inherited; property passing at the owner's death to the heir or those entitled to succeed; legacy. 2. the genetic characters transmitted from parent to offspring, taken collectively. 3. something, as a quality, characteristic, or other immaterial possession, received from progenitors or …

Member Avatar for rubberman
-1
80
Member Avatar for soujanya.bhat.184

Please review the following code and compare with yours. Take note of the comments and try to understand why I made the changes that I made. I tried to keep the spirit of the algorithm the same, even though I'd probably do this differently: #include<stdio.h> #include<string.h> int main(void) { char …

Member Avatar for deceptikon
0
146
Member Avatar for poloblue

> So far I have this, but I think it is wrong because it is giving me syntax errors. That's a reasonable conclusion. ;) What are the syntax errors?

Member Avatar for deceptikon
0
197
Member Avatar for iamthwee

> Do you think they might ask me about active directory and exhange server? You *might* be asked about IIS, but I strongly doubt that a webmaster would be expected to maintain the local network if it's not explicitly stated that you're interviewing for a dual webmaster/sysadmin position.

Member Avatar for LastMitch
0
232
Member Avatar for lmsmi1

Okay, I'll bite. On the assumption that you won't simply turn in my code as if you wrote it, and because the Vigenere cipher is so shockingly simple, here's some working code: #include <climits> #include <cstdlib> #include <iostream> #include <string> using namespace std; /* @description: Increments value and wraps around …

Member Avatar for rubberman
0
606
Member Avatar for xIXZeroIXx

This is a parsing problem, not a simple tokenizing problem. Do you have more details as to the format of the instructions? It looks like you're attempting to write a program that reads assembly-like instructions and break them down into component parts. For that I wouldn't use strtok() as the …

Member Avatar for WaltP
0
561
Member Avatar for superchica08

http://eternallyconfuzzled.com/arts/jsw_art_bigo.aspx > this is how it is exactly written on the handout There's clearly a typo in the outer loop condition. `i < n - 10` is probably what was intended.

Member Avatar for superchica08
0
270
Member Avatar for ckchaudhary

> The buttons may only show posts which are currently negative or positive, so if someone voted down and someone else voted up, the net result would not be visible on either button. Yup. The numbers show voting history on your account and the buttons retrieve currently positive or currently …

Member Avatar for ckchaudhary
0
183
Member Avatar for Secone

> The first part of that function is used to sort the words gathered in a text file from A to Z, the second part is meant to find any duplicate words Pro tip: If the description of your function includes the word 'also', it should probably be refactored into …

Member Avatar for Secone
0
227
Member Avatar for khocmedemmua

Alternatively, and this would be my preferred option, you can use the KeyPress event to disable that key entirely: private void textbox_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == ''') e.Handled = true; }

Member Avatar for //Gonz
0
114
Member Avatar for narendharg

> Could you please advise if I am doing some thing wrong here? You're doing something wrong by including file1.c in file2.c. Note that Narue was talking about visibility in the *translation unit*, not source files. A translation unit is the resulting intermediate file after the preprocessor has run, which …

Member Avatar for nitin1
0
639
Member Avatar for iamthwee

We're going to chalk it up as impractical to fix, at least in any automated way. Feel free to report any posts you find to have truly egregious formatting and one of the mods can attempt to fix it.

Member Avatar for iamthwee
0
129
Member Avatar for sanket044
Member Avatar for jugal bharadwaz

bool? my_var = null; Of if you like being verbose: Nullable<bool> my_var = null;

Member Avatar for deceptikon
0
40
Member Avatar for JudyBetch

That's not C++, but the algorithm isn't exactly language specific. To simplify things I'd suggest a nested loop: // Check the previous, current, and next row for (int i = row - 1; i <= row + 1; ++i) { // Exclude invalid row indices if (i < 0 || …

Member Avatar for deceptikon
0
192
Member Avatar for nitin1

Keep in mind that you won't be able to perfectly simulate sizeof because it's a compile time operator. But you can get somewhat close for the type syntax with pointer arithmetic: #define SIZEOF(type) (int)((char*)((type*)0) - (char*)((type*)0 + 1)) It's not strictly portable, but I've yet to see a system where …

Member Avatar for deceptikon
0
169
Member Avatar for Secone

> What else could you need to know? The contents of the file and enough context to test your code, obviously. For example, how have you defined WordStruct? Please compose a small test program that's complete, then post it here along with a sample of the file you're using. Reproduction …

Member Avatar for Secone
0
167
Member Avatar for johnray31

> why array size is different inside function solution1? Because the "array" in solution1 isn't an array, it's a pointer. Don't be tricked by the array-like syntax of `int array[]` in a function parameter declaration, it's just syntactic sugar and equivalent to `int *array`.

Member Avatar for johnray31
0
178
Member Avatar for gerbil

> Purple is for girls. 1. The owner is a girl. 2. Men who say "XYZ is for girls" just need more confidence in their masculinity. ;)

Member Avatar for happygeek
0
294
Member Avatar for RozenKristal

> you can use freopen() to read or write data from/into the file Why freopen() specifically? freopen() is actually a fairly rare function to need, usually being the choice for unusual stuff like redirecting standard streams from code or changing the open mode of an existing stream. > But I …

Member Avatar for nitin1
0
139
Member Avatar for gerbil

> I don't see code here, why is it being detected as such? The detection algorithm presently looks for four spaces, a tab, or curly braces anywhere in the post.

Member Avatar for gerbil
0
242
Member Avatar for onofej

Why a text box? That forces you to validate essentially unchecked input. If you don't want to use radio buttons, how about a dropdown menu with M or F?

Member Avatar for LastMitch
0
173
Member Avatar for samohtvii

C has no references, so you'd use a pointer to a pointer. The concept of using a pointer to an object to modify the object can be applied recursively, and the "object" you need to modify can be a pointer.

Member Avatar for Ancient Dragon
0
206
Member Avatar for adrawat

I'll answer your comments directly: > // Should I malloc memory for ptr_ex here before assigning values to it??? Yes. An unintialized pointer is not a pointer to usable memory, you must first point it to memory that you own either through dynamic allocation or through the address of an …

Member Avatar for adrawat
0
212
Member Avatar for resmi sanker

The End.