3,183 Posted Topics

Member Avatar for jigglymig

It sounds like you copied the executable itself rather than creating a shortcut.

Member Avatar for deceptikon
0
138
Member Avatar for akuma_reen

You're sorting and printing while building the array, which is not entirely incorrect, but unlikely to display properly. Finish reading the file, then sort and print; you'll get the correct result that way. Here's the corrected code with a few other changes: #include <stdio.h> #include <string.h> #include <stdlib.h> static void …

Member Avatar for akuma_reen
0
2K
Member Avatar for chumli

It depends quite a bit on the contents of your file. Let's say that the file looks like this: resistor inductor capacitor diode transistor circuit Then you would replace your `push_back` calls with something like this: ifstream in("words.txt"); if (in) { string line; while (getline(in, line)) { words.push_back(line); } } …

Member Avatar for chumli
0
147
Member Avatar for shahera.arafat

> how can I use it ?? A "dynamic array" is really nothing more than simulating an array. Once created, you use it very much like a regular array. > how can I allocate and intialize it ??? This will allocate a dynamic array of 10 pointers to `int`, then …

Member Avatar for deceptikon
0
154
Member Avatar for Tahani

Please read our [rules](https://www.daniweb.com/community/rules) concerning homework.

Member Avatar for deceptikon
0
102
Member Avatar for Shafra

Someone can help you when you ask a specific question. Daniweb isn't a "do my work for me" service. I do have one question though, given that VB6 is increasingly becoming unsupported on Windows (eg. runtime dependencies are no longer installed by default): Why are you using VB6 instead of …

Member Avatar for deceptikon
0
42
Member Avatar for juanpa_2510

> Is it valid to use an integer variable as a condition? Yes. This: if (var) Is logically synonymous with this: if (var != 0) Provided `var` has an implicit conversion to an integer or boolean type, it's perfectly valid and makes for nice shorthand in some cases. In this …

Member Avatar for deceptikon
0
175
Member Avatar for gtcorwin

The reply editor also has helpful buttons that will do this for you. 1. Select your text and click either the Code or Inline Code button to apply formatting. 2. Click the Code button to open an editor popup where you can paste your code. Submitting that will insert into …

Member Avatar for deceptikon
0
171
Member Avatar for vaultdweller123

> i suck because i had zero knowledge on Unix or Linux No, that's silly. Will learning other operating systems help round you out as a developer? Sure. Does your "goodness" as a programmer depend on knowing \*NIX platforms? Absolutely not. Let me put it this way. I'm primarily a …

Member Avatar for vaultdweller123
0
177
Member Avatar for COKEDUDE

It rather depends on the type of the array. If it's anything but some variant of `char`, I'd recommend using a loop to avoid nasties by diddling with individual bytes of a multi-byte type.

Member Avatar for Maritimo
0
190
Member Avatar for ahmedsa

Off the top of my head, I might approach it two ways: 1. Simply have the application check periodically for new records. This would be the easiest to implement, but it may see derading performance over time. 2. Use a notification service that pushes new records to client applications so …

Member Avatar for cgeier
0
184
Member Avatar for exoruel

The logic should be conditional. You're inverting the case based on the original case, not unconditionally changing it: for (int i = 0; input[i] != '\0'; i++) { if (isupper(input[i])) { input[i] = tolower(input[i]); } else if (islower(input[i])) { input[i] = toupper(input[i]); } } cout << input << '\n';

Member Avatar for Maritimo
0
174
Member Avatar for jmwalloh

Sorry, but discussion of hacking is against Daniweb's rules. We can help you at a high level, but anything more detailed that could be used to create an exploit is prohibited.

Member Avatar for deceptikon
0
277
Member Avatar for COKEDUDE

Do you mean what rules you *must* follow for a valid identifier, or guidelines for informative variable names?

Member Avatar for vegaseat
0
278
Member Avatar for RobertHDD
Member Avatar for joshua_8
Member Avatar for ogsirus

> The part I’m struggling with is getting the date out of the string which will work for different string lengths So here's my thought process as a professional (as if that adds weight to my comments...): 1. Is the date always in the same place (ie. at the end …

Member Avatar for deceptikon
0
2K
Member Avatar for COKEDUDE

Undefined behavior is unpredictable by definition. You could certainly figure out why it "works", but it would be specific to that version of that compiler.

Member Avatar for Moschops
0
146
Member Avatar for humorousone

> Ok, so I tried to change my class properties as Pritaeas suggested, but this didn't work. It should work, but it's hard to tell why not without seeing a complete bare bones example that exhibits the problem. > Would this be an appriopriate use of (get;set;)? Yes. In fact, …

Member Avatar for humorousone
0
24K
Member Avatar for saurav_panda

Yes, someone can help. What do you have so far? If you don't have anything, what's your thought process for working it out? Have you analyzed the structure of a sentence to break it down into words? Note that "help" does *not* constitute doing work for you.

Member Avatar for deceptikon
0
2K
Member Avatar for happygeek

> Apologies if that led you down the road, not intentional. Careful there Davey, we might start thinking you're a disingeunous journalist who's into fearmongering. ;) Ernieway... > According to research commissioned by security vendor Bit9 + Carbon Black, nearly half (49%) of the organisations questioned admitted they simply didn't …

Member Avatar for MidiMagic
3
2K
Member Avatar for payal.hedaoo.7

God forbid you post interesting content that people will like. I guess that's too much work compared to artificially increasing likes with silly things such as sock puppet accounts.

Member Avatar for goodtaste
-1
276
Member Avatar for tony75

That's a pretty simple one. There's no definition of the _Clrscr function anywhere in the translation unit. Visual Studio doesn't come packaged with any form of clrscr as a "standard" library, so you need to consider the following: 1. Did you declare it somewhere but not define it? 2. Are …

Member Avatar for tony75
0
980
Member Avatar for Diellza

Normally I'd point out what's wrong, but in this case it's *very* instructive to work through what the code should be doing versus what it's actually doing on paper. Here's a working example you can use to compare with though. It's written in C, but a conversion to C++ is …

Member Avatar for deceptikon
0
793
Member Avatar for teddyshow
Member Avatar for usmanjani
Member Avatar for usmanjani
0
317
Member Avatar for amoabengnunez.collins
Member Avatar for rubberman
0
124
Member Avatar for mattster

Ah pronuciation. T'was the bane of my existence (not really, just mildly annoying) with a previous account.

Member Avatar for vegaseat
2
198
Member Avatar for COKEDUDE

> More control, you know you have exactly 1 line the are no extra characters interfering with your parsing of the data With the caveat that your second advantage interferes with the first. > You limit the amount of data read to your buffer size so there is no chance …

Member Avatar for Banfa
0
1K
Member Avatar for abdul rahman 2

Given a certain measure of development experience, simply seeing the behavior of a program can offer insight into the underlying logic as well.

Member Avatar for deceptikon
0
92
Member Avatar for silvercats

> The second method is obviously easier to read. Provided blocks are indented correctly and at a reasonable depth, the location of braces doesn't really matter...to a certain extent. I think you'll find that your preference varies over time. Right now you clearly prefer Allman bracing over K&R, but that …

Member Avatar for samson.dadson.3_1
0
507
Member Avatar for Gurjit_1

A segmentation fault typically means you tried to access memory outside of your address space. The most common causes of this are a bogus index or invalid pointer. Also note that the point at which an error manifests doesn't mean that exact line is the root cause. Sometimes the line …

Member Avatar for Gurjit_1
0
2K
Member Avatar for NOSH1
Member Avatar for deceptikon
-1
100
Member Avatar for lewashby

> I'm a little confused about inlining member functions. It would help to understand how regular functions typically work. A single definition of the code is created, then calling code jumps into the definition to execute the function. Inlined functions have their bodies essentially pasted directly where the call is …

Member Avatar for deceptikon
0
130
Member Avatar for ToucheAmore

> i think you can go to ios for developing application on i phone....and java/android for all leading smartphones... iOS isn't a language, it's a platform. Objective-C is the language that Apple has blessed for iOS development. At one point "third party languages" were disallowed, but that stance has changed. …

Member Avatar for priyaspageo
0
550
Member Avatar for deceptikon

I work with images...a *lot*. Often this involves image processing of various types such as resizing, resampling, and various cleanup operations. However, a common issue is that people like to conflate Adobe PDF with images. As such, any application that works with images should also work with PDF. However, since …

Member Avatar for deceptikon
2
1K
Member Avatar for Tycellent

> Are any particular one which should be used at specific times? I favor the guideline that you should use `'\n'` unless you know that the stream must be flushed immediately and nothing else consistently does it for you. Times where you have a lone output statement and the stream …

Member Avatar for rubberman
0
407
Member Avatar for BibhutiAlmighty
Member Avatar for EclipticalD
Member Avatar for Santanu.Das
0
147
Member Avatar for oussama_1

> - my fingers are on "A", "W" and "D" keys Yup, I've got that one. Another is that I have a tendency to end sentences with a semicolon due to excessive coding in languages that use a semicolon as a statement terminator.

Member Avatar for Warrens80
1
367
Member Avatar for lilita

Depending on your needs, it could be as simple as: if (Directory.Exists(path) || File.Exists(path)) { // Yuppers } But it's somewhat hard to answer your question because it's a little vague. What exactly constitutes "valid", for example? What kind of paths are you supporting? Is this a file path or …

Member Avatar for ddanbe
0
140
Member Avatar for BibhutiAlmighty

My primary concern would be what kind of pictures are you trying to display? A picture box control may not support them, in which case you need to find an alternative. As far as picking a random picture, that borders on trivial: var files = Directory.GetFiles(path, searchPattern); var imagePath = …

Member Avatar for deceptikon
0
84
Member Avatar for mattster
Member Avatar for mgold

> Internet recources on algorithms are suprisingly sparse, especially compared to "regular" programming. Ironically, my go-to quick reference for algorithms and data structures [is a website](http://xlinux.nist.gov/dads//). It's the most complete reference in a single location to the best of my knowledge, and tends to be recently updated. Not perfect, but …

Member Avatar for StefanijaV93
0
451
Member Avatar for shahera.arafat

> why they put it ?? They're being explicit, I suppose. If a function returns `void`, there's no need to place a return at the end. Falling off the closing brace does it automagically. > what is the logical meaning of it ?? It means that the function will hand …

Member Avatar for mike_2000_17
0
195
Member Avatar for nikhil.mahajan.90410

Without looking at the specs, or knowing your needs, I've had good experiences with both brands (my current mobo is ASUS). To properly answer your question, I'd need more details.

Member Avatar for rubberman
0
84
Member Avatar for RikTelner

> it consists out of multiple files including *.vshost.*, I don't see such files in Word, Skype of Firefox The vshost files are specific to your installation of Visual Studio for debug and settings information, they're not included in a deployment package. > One gives a lot of knowledge of …

Member Avatar for deceptikon
0
230
Member Avatar for Jack_9

A good start in determining what's wrong is asking what it's doing versus what you expect it to do. So...what's it doing that's different from what you expected? :) I see two problems in particular, one of which will be immediately obvious from the compiler's errors and the second will …

Member Avatar for Jack_9
0
286
Member Avatar for Bharath_4
Member Avatar for J.C. SolvoTerra

Were I writing something like that, I'd link the web access and application access with a web service. * Web Service: WCF * Web Access: ASP.NET * Application: WinForms or WPF * Mobile: Whatever WSDL consumption API is available for the supported language.

Member Avatar for J.C. SolvoTerra
0
208

The End.