Posts
 
Reputation
Joined
Last Seen
Ranked #48
Strength to Increase Rep
+15
Strength to Decrease Rep
-3
100% Quality Score
Upvotes Received
178
Posts with Upvotes
153
Upvoting Members
94
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
121 Commented Posts
~609.03K People Reached
Interests
programming, 3d modelling & animation, archery, martial-arts, reading, camping, hmm... what…
Favorite Tags
c++ x 1K
pascal x 451
c x 225

1,118 Posted Topics

Member Avatar for Firestone

Typically the main icon is linked in at compilation. How exactly you do it depends on your compiler. In all cases, a Windows resource named MAINICON is in your exe. You can also check out [URL="http://angusj.com/resourcehacker/"]Resource Hacker[/URL], which you can use to manually change a program's icon.

Member Avatar for Amina_6
0
952
Member Avatar for brettw02

The best way to learn actually is to try to do it yourself. A good reference is always a very useful help. I refer to these two often: [URL="http://www.cppreference.com/"]C/C++ Reference[/URL] (short and sweet) [URL="http://www.cplusplus.com/"]cplusplus.com[/URL] (all the gory details) Start small, add on details as you go, and you'll be able …

Member Avatar for Jaynish
0
3K
Member Avatar for Wiki_Tiki

Since you are compiling with the [inlinecode]UNICODE[/inlinecode] flag, you must either indicate that string literals are wide-char directly: [inlinecode]L"Hello world!"[/inlinecode] or (better yet) use the [b]TEXT[/b]() macro: [inlinecode]PlaySound(TEXT("beep.wav"), 0, SND_LOOP|SND_ASYNC);[/inlinecode] Have fun.

Member Avatar for sahana_3
0
692
Member Avatar for stilllearning

[URL="http://www.parashift.com/c++-faq-lite/templates.html"]http://www.parashift.com/c++-faq-lite/templates.html[/URL]

Member Avatar for parchuresunilv
0
2K
Member Avatar for iansane

You'll also improve your program's safety by using the [b]std::string[/b] type: [code=C++] #include <fstream> #include <iostream> #include <string> using namespace std; int main() { string filename; cout << "Name your file> "; getline( cin, filename ); fstream file( filename.c_str() ); if (!file) { cout << "I could not open the …

Member Avatar for Jaja19
0
17K
Member Avatar for pukepuke

Hey there, just a heads-up to let you know that help is forthcoming. I just had to go learn how to solve a linear system of equations using gaussian elimination and partial pivotization first. Now I'm looking over your code. I've got a few suggestions about commentary and variable names, …

Member Avatar for Victory_1
0
1K
Member Avatar for AKJo

The TMediaPlayer component should be able to play with any codec installed on your computer. Can you play the file normally using Windows Media Player from Explorer?

Member Avatar for Duoas
0
823
Member Avatar for glubbish

His question is why the rewritten stuff on Windows 7 works so much faster than what he had been using. @OP: You state that you are using `CopyFileEx()` (a Win API function) on Unix systems and it is going slow. Assuming your original code does not have any hooks on …

Member Avatar for Duoas
0
286
Member Avatar for Ahmad Imran

I notice you are spamming the forum with a lot of questions that you could easily get the answer to by simply reading [the documentation](http://en.cppreference.com/w/) or simple searches on Google. What about my answer to [this same question](https://www.daniweb.com/software-development/c/threads/490534/c-preprocessor-directives) needs you to start another thread to ask it again?

Member Avatar for Duoas
-1
98
Member Avatar for Ahmad Imran

There is no exhaustive list, because each compiler system + OS has their own. There are common, standard ones, though. [Here's the GNU CPP's documentation.](https://gcc.gnu.org/onlinedocs/cpp/Index-of-Directives.html#Index-of-Directives) Hope this helps.

Member Avatar for Duoas
-1
231
Member Avatar for BENTABET
Member Avatar for Mubeshier

Plenty of people still program with ancient, pre-standard compilers, particularly in places like India. Also, there does exist the [WinBGIm port](http://winbgim.codecutter.org/) for MinGW, so old BGI code certainly can and does compile with modern GCC. Alas, I am currently reinstalling my compiler (I managed to hose it with an 'automatic …

Member Avatar for Duoas
0
1K
Member Avatar for cambalinho

No. All (normal) messages go to a window event handler. The functions you write to handle events can, of course, be as window agnostic as you like.

Member Avatar for cambalinho
0
415
Member Avatar for RAUF_2
Member Avatar for Rimas_1

I hesitate to link to another site for your answer, but your question about how to use `qsort()` is entirely answered in the FAQ [here](http://www.cplusplus.com/faq/sequences/sequencing/sort-stuff/#c). It explains how `qsort()` works and gives an example of randomizing data with it. That comparison function is the key to making it work. Hope …

Member Avatar for sneekula
0
213
Member Avatar for tnd2491
Member Avatar for Simon180

I wish I could say. Richedit does have some random issues. 1) Make sure you are linking to the most current RichEdit DLL (4.1). 2) Make sure your window with the RichEdit control is *not* doublebuffered. 3) Make sure your manifest is correct. I assume you are using the RichEdit's …

Member Avatar for Duoas
0
195
Member Avatar for nitin1

Is there something left out about the format of the data you are searching? There is no way to search *random* data faster than O(n). However, if your data were *sorted* then you could search it in O(log n). Also, every time you add extra code to do something the …

Member Avatar for Duoas
0
211
Member Avatar for it@61@sec

stty is not the best option for this. You should first look to see if the environment variable $COLUMNS exists. It is most likely to be correct. Failing that, use the command `tput cols` to query the terminal size. If you really want to do it properly though you'll have …

Member Avatar for L7Sqr
0
523
Member Avatar for tinased

What you've got seems to introduce but not use 't', and has a bug on line 16 (when temp->next is NULL). Also, you are endeavoring to do two things at once: sort *and* display. Don't do that. Put the sort stuff in its own function. Sorting is not particularly easy, …

Member Avatar for Duoas
0
744
Member Avatar for nitin1

To be clear, *no*, you *cannot* override static methods. (You can *overload* them, though.) The reason is simple: a static method cannot appear in a class's virtual function table, so it is not inherited. In order to call a static method you must know exactly what type of object you …

Member Avatar for Duoas
0
4K
Member Avatar for ameer.idreis

Using a library and decoding an image yourself are two totally different things. The OP cannot change his compiler's environment, but there is never any restriction on the files you can create for a single-user directory (outside of diskspace, of course). Using CImg would work fine. (I know this is …

Member Avatar for HiHe
0
290
Member Avatar for nuller

That code is wrong in a number of subtle and dangerous ways. But what it is trying to do is write the binary value of a 'PasswordGenerator' object to file. Any object you wish to write should have a function to explicitly convert it to either text or binary. If …

Member Avatar for Duoas
0
495
Member Avatar for Duoas

Hey all. I'm always frustrated that I cannot seem to find a reference that shows when a feature was *introduced* in Delphi. For example, to use ErrOutput, I have to manually create that value in D5. But what about D6? or D7? Does such a reference exist?

0
113
Member Avatar for AndresOend

Apple is putting a lot of effort into LLVM. Unfortunately, the LLVM debugger doesn't work with FPC (yet, AFAIK). You'll either have to get an old copy of the GDB or install an older version of X-Code (you can do this side-by-side with your current version). Alas, I don't have …

Member Avatar for Duoas
0
925
Member Avatar for veronicak5678

[B]scanf()[/B] and [B]cin[/B] tokenize on whitespace, so yes, they stop reading input at any whitespace. Please don't use gets(). [B]fgets()[/B] reads an entire line (it even returns the newline character at the end of the line), so if there are spaces in the line you'll get them too. The C++ …

Member Avatar for bridgett.grace
0
2K
Member Avatar for Gotovina7

The best place to start is to get out a piece of paper and a pencil and figure out how you do it yourself. Once you know how to do it, step by step, you can tell the computer how to do it. When you have thought it out enough …

Member Avatar for Schol-R-LEA
0
2K
Member Avatar for prajwaludupa

IIRC, it worked just fine. You aren't seeing output because of the way Turbo C/C++ initializes the console output. The problem is that you are doing something wrong. Are you trying to get a directory listing? Or just show it to the user?

Member Avatar for sri.voma
0
680
Member Avatar for zekesteer

The difference between an procedural and an object-oriented approach is how you bind the data and the functions that do something to it together. Right now you have a very good structure. You have [B]struct[/B]s that hold the data, and functions that operate on specific data. What you need to …

Member Avatar for Step-hen
0
2K
Member Avatar for hey_shishir
Member Avatar for jai_steave

Nice, but it fails on three counts: 1. It doesn't return the new head of the list. 2. It fails if [B]h[/B] is NULL. 3. It fails on really big lists (stack overflow). Here's an iterative solution you might enjoy. [code=C] /* Reverse a singly linked list without recursion. The …

Member Avatar for deceptikon
0
445
Member Avatar for corl45

The [B]windres[/B] program doesn't like pathnames with spaces in them. It is also possible that the Dev IDE is not properly quoting pathnames with spaces in them... but even if it does the windres program is surprisingly broken on this point. Sorry.

Member Avatar for miracleX
0
1K
Member Avatar for ecostas

In the DPR file before the main form is created, set the monitor to the one you want: [inlinecode]application.mainForm.monitor := screen.monitors[ 1 ];[/inlinecode] I've never done this before, nor have I ever had a dual-monitor system, so I can't say this will actually work... But I think it will. Hope …

Member Avatar for raymhuff
-1
3K
Member Avatar for kS_100

Sorry to say, no one here is going to give you code. Frankly, if you plan to write a report on how to improve code, you need to have a pretty good idea of how the code is generally implemented to begin with. You should be able to write it …

Member Avatar for venom61991
0
735
Member Avatar for akhilchandranms

Some repairs. [code=C] #include <stdio.h> #include <stdlib.h> int main() { int i ; i=system("dir"); printf("%d",i); getchar(); return 0; } [/code] This is correct. @[b]nezachem[/b] [b]system[/b]() expects either an executable or a shell builtin. The [b]system[/b]() function can fail for a number of reasons. Be sure to read the [URL="http://linux.die.net/man/3/system"]man page[/URL] …

Member Avatar for deceptikon
0
1K
Member Avatar for HLA91

It isn't the code that's complaining, it is the linker ([B]ld[/B]). Most likely you are trying to write to a file that is read-only, or read or write a file that you don't have access rights to. Are you using linux?

Member Avatar for graceville
0
3K
Member Avatar for savinki

You'll need to use the [B][I]modulo[/I][/B] (or [B][I]remainder[/I][/B]) operator: [inlinecode][COLOR="Red"]%[/COLOR][/inlinecode] It does what it says: [inlinecode]cout << (123 % 10);[/inlinecode] Hope this helps.

Member Avatar for Shahzad Ahmad
0
320
Member Avatar for maple23

You've created a 2D array of (char*) (pointers to char), but you have not pointed them anywhere. Hence they are [URL="http://en.wikipedia.org/wiki/Dangling_pointer"][I]dangling pointers[/I][/URL], and will cause your program to crash. If you want a 1D array of strings (where a string is an array of char): [inlinecode]char names[ NUM_NAMES ][ MAX_NAME_LENGTH …

Member Avatar for richard_arnold
0
769
Member Avatar for richasr1

Eh, why not? [B][[I][/I]code=C++[I][/I]][/B] [code=C++] switch (pnlCards.Tag) { case 0: result = prediction; break; case 1: case 2: case 3: case 4: case 5: TPanel p = (TPanel)(pnlCards.Controls[ pnlCards.Tag ]); TPanel p0 = (TPanel)(pnlCards.Controls[ pnlCards.Tag-1 ]); if (p.Tag > p0.Tag) result = higher; if (p.Tag < p0.Tag) result := lower; …

Member Avatar for IvanC
0
560
Member Avatar for Kob0724

I have never played directly with Qt stylesheets... but it appears that you need to provide an image for the indicator with the color you want. Here's what I found about it: [url]http://lists.trolltech.com/qt-interest/2006-11/thread00074-0.html[/url] The OP wants to manage different colors for different states, but the underlying problem is the same. …

Member Avatar for naresh4230
0
3K
Member Avatar for zifr

Show us what you can do and we'll help you where you get stuck. You will need a loop and two conditional checks to see if the letter needs to be converted to uppercase. I assume ASCII?

Member Avatar for spixy
0
6K
Member Avatar for crimson08

Using the Win32 API, you need to: 1. CreateCompatibleDC to create a DC compatible with your window's DC 2. CreateCompatibleBitmap with the appropriate dimensions 3. SelectObject to select the window into the bitmap 4. BitBlt the window into the bitmap 5. Save the bitmap as Jpeg Hope this helps.

Member Avatar for deepakx250
-1
1K
Member Avatar for onemanclapping

The exact macro to test for depends on OS [i]and[/i] compiler. Here is a handy reference for [URL="http://predef.sourceforge.net/"][B]Pre-defined C/C++ Compiler Macros[/B][/URL]. Unless you have been careful to predefine specific macros in your makefiles as [b]AD[/b] instructed, you should test for all the possible macros that you might expect. On Windows, …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for Noliving

I know this sounds funny, but you need to get out a piece of construction paper and some crayons and draw yourself a house. Then, using your finger, 'click' on the picture where the instructions say and in the order they say. For example, 1: click on lower-left corner of …

Member Avatar for Karsam
-1
4K
Member Avatar for kashmir323

The app doesn't restart -- it doesn't terminate until you drop off the end of the main() function. If you really want to clear the screen, [URL="http://support.microsoft.com/kb/q99261/"]this is how Microsoft does it[/URL]. Enjoy.

Member Avatar for WaltP
0
2K
Member Avatar for Mehwish Shaikh
Member Avatar for peter_budo
0
315
Member Avatar for Deemar

I don't know how you have your script set up, but the [Tasks] and [Components] sections are specifically designed for this. Every "task" you list in the tasks section indicates some component to install. The Inno Setup Help documentation is very complete, and gives examples. You have to stare at …

Member Avatar for popelka
0
713
Member Avatar for vedro-compota

[URL="http://pubs.opengroup.org/onlinepubs/009695399/basedefs/limits.h.html"][b]LINE_MAX[/b][/URL] is an IEEE extension to the standard [URL="http://www.cplusplus.com/reference/clibrary/climits/"]<limits.h>[/URL], found on some *nix systems. [b]TurboC[/b] does is older than, and does not follow, Open Group specifications. The proper way to do what you want is to use a stack-local variable: [code=C] #include <stdio.h> #include <string.h> #define MY_MAX 1000 int main() …

Member Avatar for vedro-compota
0
2K
Member Avatar for Undertech

In addition, you should have a [b]removeBook[/b]() (or some such named) method(s) for the user's convenience.

Member Avatar for doug65536
0
2K
Member Avatar for jmay1327

It should also be noted, in addition to [b]StuXYZ[/b]'s excellent comments, that you should get an entire [b]Student[/b] before adding a copy of it to the vector. Your choice of variable names is pretty good, actually, but I will nit-pick about the vector name: "sNames" -- first, it isn't a …

Member Avatar for jmay1327
0
214

The End.