1,118 Posted Topics

Member Avatar for augussk

Since no one else has responded, I'll throw in my $0.02, which isn't worth much when dealing with MFC. How are you allocating the data? Is it all at once (in one big chunk)? The computer can't handle that. Make sure you allocate in fragments. Personally, I don't think you …

Member Avatar for Duoas
0
121
Member Avatar for Jennifer84

It isn't complaining about the [B]std::vector[/B] class, but the [B]string[/B] class, which doesn't exist. Make sure you say: [inlinecode]std::vector<std::string> Value(10);[/inlinecode] Hope this helps.

Member Avatar for Jennifer84
0
159
Member Avatar for nirmalarasu

The answer is [B][I]no[/I][/B]. Not even Tcl is installed by default on all flavors of linux. About the only thing you can guarantee is that either [B]/usr/bin/sh[/B] or [B]/bin/sh[/B] is available. (And on most linuxes it is actually [B]bash[/B].) You can, of course, make your install and/or start script(s) test …

Member Avatar for Duoas
0
153
Member Avatar for Delphic

Since no one else is responding, I'll offer my meager bone. How is Delphi involved here? Did you use Delphi to do the FTPing? Or are you using Delphi to try to start the jpg, exe, etc.? What filesystem is the file sitting on (NTFS, FAT, EXT2/3, Reiser FS, IBM …

Member Avatar for Duoas
0
83
Member Avatar for DJPlayer

[URL="http://www.cprogramming.com/faq/cgi-bin/smartfaq.cgi?id=1043284376&answer=1045690279"]There's nothing wrong with using [B]\n[/B][/URL].

Member Avatar for Duoas
-1
109
Member Avatar for Lynxus

Why are you dividing the number of liters by 10? Don't say [B]string[5][/B]. Just use [B]string[/B]. You haven't yet explained exactly what is wrong, so I don't know what better to say... Does this help?

Member Avatar for Duoas
0
333
Member Avatar for sgw

It isn't C++ that's buffered, it is the device you are reading. C++ doesn't care either way. When the standard input is from the keyboard, it is buffered. If it is redirected from, say, a file, it is not buffered. (By "buffered" of course I mean "line-buffered".) Either way it …

Member Avatar for Narue
0
258
Member Avatar for nickthedivil

As this is C++, why don't you use C++? Also, [B][I]never[/I][/B] use gets(). The reason you are failing is that charname will [I]never[/I] == chartryname, since both are [I]pointers[/I] and both point to [I]different[/I] locations. If you use the std::string class, the == operators are overloaded so that you can …

Member Avatar for WaltP
0
101
Member Avatar for stk123

An access violation occurs when you try to access memory that doesn't belong to you. You need to think a little more carefully about what you are doing with all those variables. For starters, only mess with [I]one[/I] linked list at a time. Also, make sure to get out a …

Member Avatar for Duoas
0
150
Member Avatar for MxDev

I don't know that any one toolkit is "easy". GUI stuff is fairly involved --there is a distinct learning curve. I would recommend finding an IDE that can setup a basic GUI project for you and help you out. [URL="http://www.free-soft.org/guitool/"]The GUI Toolkit, Framework Page[/URL].

Member Avatar for Duoas
0
78
Member Avatar for quijote_mx

It's a DLL. ;) [inlinecode]%SystemRoot%\system32\shimgvw.dll[/inlinecode] [URL="http://forums.pcworld.co.nz/archive/index.php/t-28995.html"]Check out this thread I googled[/URL].

Member Avatar for choudhuryshouvi
0
139
Member Avatar for fskhan

Yoinks people! Always the hard way! [code=C] unsigned long reverse_bits( unsigned long value ) { unsigned long result = 0; while (value) { result <<= 1; result += value & 1; value >>= 1; } return result; } [/code]

Member Avatar for jephthah
0
3K
Member Avatar for atish00

Vista no longer supports the DOS subsystem. You'll have to find another VM (like DOSbox) to run 16-bit programs.

Member Avatar for atish00
0
287
Member Avatar for bob on whidbey

Regions are for windows. [I]Not[/I] for painting. You should be able to set the [B]transparent[/B] and [B]transparentColor[/B] properties of the bitmap before [B]draw[/B]ing it in your paint procedure. Hope this helps.

Member Avatar for Duoas
0
150
Member Avatar for python_dev

Well, as no one else is responding... I'm not going to spend a lot of time looking through the Indy 10 documentation (which is fairly massive) and I don't know that much about FTP. Are you transferring in binary mode? You should try to catch the exact exceptions raised on …

Member Avatar for python_dev
0
137
Member Avatar for DarkDot

It depends. In MAL and TAL: no, it is not legal (the second item must also be a register). In SAL, sure.

Member Avatar for Duoas
0
57
Member Avatar for DarkDot

You only need to traverse the list once. Set your "current max" to the first element in the list. For the remaining elements of the list, test each one against the "current max". If greater, set the "current max" to the current element. [edit] Removed. I was still on x86 …

Member Avatar for Duoas
0
80
Member Avatar for dinosaurclover

That's because commands in the cwd are not in the PATH by default on Linux/Unix. Type [inlinecode]./a.out[/inlinecode] Enjoy!

Member Avatar for plgriffith
0
144
Member Avatar for glindhot

You could also use the [B]StrOfChar[/B] function in the [B]SysUtils[/B] unit. [code=Delphi] function make_filename( i: integer ): string; begin result := ''; if (i < 0) or (i > 999) then exit; result := intToStr( i ); result := 'image' +strOfChar( '0', 3 -length( result ) ) +result end; [/code] …

Member Avatar for glindhot
0
289
Member Avatar for linux

The only GUI toolkit built-in to Python is Tk. (And Tcl/Tk most definitely [I]does[/I] work on the iPod!) I know next to nothing about the iPod. Is it an embedded OS? In any case, it is certainly [I]possible[/I] to make a single program that does python/tk, but you will likely …

Member Avatar for linux
0
152
Member Avatar for abhi_elementx

You've compiled the code, but you still haven't linked it into DLL and lib files. Make them with [inlinecode][COLOR="Red"]g++ -shared -o dlltest.dll dlltest.o[/COLOR] -Wl,--out-implib,libdlltest.a[/inlinecode] This creates both the DLL and an import library. If all you want is the DLL, ignore the stuff that isn't in red. (That's a -W …

Member Avatar for Duoas
0
166
Member Avatar for LoloftheRings

It works just fine. Make sure your RC file looks something like [code=RC] MySound1 RCDATA "spiff.wav" MySound2 RCDATA "bloink.wav" [/code] etc. Compile it to a resource file (*.res) using whatever program you have to do that (like windres.exe that comes with GNU stuff). Inside your program, you'll need to use …

Member Avatar for Duoas
0
261
Member Avatar for n_mehdi

You have to use the [B]InitGraph[/B] procedure before you can use anything else in the Graph unit.

Member Avatar for Duoas
0
91
Member Avatar for johndory

The prototype for the method should look like this: [inlinecode]void Polynomial::set( const double coefficients[], unsigned count );[/inlinecode] This takes an array of "count" coefficients. Does this help? (If not, what is the type of [B]coef[/B] in [inlinecode]P.set(coef);[/inlinecode]?)

Member Avatar for Duoas
0
87
Member Avatar for jbd

[B]Watch your types[/B]. Going off of [B]dubydapreek[/B]'s revision: [list] [*]Lines 7..11: Useless. Get rid of them. (You don't need to copy b to a before you copy b to a.) [*]Lines 27..28: You [I]should[/I] be allocating an array of (double *). [*]Lines 31..32: You [I]should[/I] be allocating an array of …

Member Avatar for Duoas
0
193
Member Avatar for Loyen

Er, you are using FreePascal as the compiler, right? ([I]Not[/I] GNU Pascal?) To open a text file, and print every line in it prefixed by the line number: [code=Pascal] {$I-} var t: textFile; s: string; i: integer; begin assignFile( t, 'fooey.txt' ); reset( t ); if IOResult <> 0 then …

Member Avatar for Loyen
0
705
Member Avatar for daviddoria

If all you want is a color cube then yes, all you need to do is increment it like a binary number. If you are [I]not[/I] storing it as a packed integer value, then you only need three loops: [code=Pseudocode] for red := min to max for green := min …

Member Avatar for Duoas
0
106
Member Avatar for nate12457

First, this belongs in the C++ forum. I'm not getting unresolved external symbol errors, but they might be mistaken for some mismatched templated function arguments ("no matching function for call to xxx"). Password.cpp: Lines 55, 68, 91 The fstream.open() function takes a (const char *), not a (std::string). Fix it …

Member Avatar for nate12457
0
147
Member Avatar for dH3ka

That's a tall order. You'll have to google for some image processing components. You might want to take a look at ImageMagick. If you just want to convert an RGB tuple to a single grayscale value, it is something like: [code=Pascal] function toGrayScale( red, green, blue: cardinal ): cardinal; begin …

Member Avatar for Duoas
0
80
Member Avatar for guitarrick

That [inlinecode]using namespace std;[/inlinecode] is a bad idea in a header file. Keep it in cpp files. The problem on line 28 is that C++ doesn't permit you to define sub-functions. Ideally, you should have a file named LISTS.cpp that looks like this: [code=C++] #include "LISTS.h" LIST::LIST() { // my …

Member Avatar for Duoas
0
123
Member Avatar for sura17

How non-standard are you willing to go? The standard way, you will have to re-write your program to take a whole number and create a string for each part of the number. For example, if given the number '42', you would make the strings [code] 1: ' _ ' 2: …

Member Avatar for sura17
0
122
Member Avatar for vishalkhialani

The Bloodshed Dev C++ is an IDE. It uses MinGW (GCC). I personally like the GCC. Stroustrup likes the Microsoft C++. Borland C++ is good too (but not always the best at standards-compliance). Enjoy.

Member Avatar for vijayan121
1
200
Member Avatar for mg0959

Or, if you happen to be running Windows, you'll need to google the RunOnce registry value or stick either your program or a link to it in the Startup folder of the start menu. What you are trying to do is OS-specific. So, if you aren't running Win or Linux, …

Member Avatar for Duoas
0
259
Member Avatar for preeeya

I think what you are looking for is the [B]overrideredirect[/B] flag. This tells the wm to buzz-off. It is generally used for pop-up windows (like balloon pop-ups, menus, etc.). It is generally a Bad Idea for use with your main application window. Hope this helps.

Member Avatar for Duoas
0
117
Member Avatar for sura17
Member Avatar for gReen_aXe
Member Avatar for DarkDot

Are you using SAL (or are you supposed to be using MAL or TAL)? I'll assume SAL. Remember that the result is stored in the [I]first[/I] item listed. For example: [inlinecode]add $t0, $a0, 12[/inlinecode] adds the value of register [B]a0[/B] and the value 12 together, and stores the result in …

Member Avatar for Duoas
0
105
Member Avatar for kartik14

[B][I]Don't use[/I][/B] [list] [*]getch() [*]system("PAUSE") [/list] Both are non-portable. Instead, do it the C++ way: [code=C++] #include <iostream> #include <limits> void pause() { std::cout << "Press ENTER to continue... "; std::cin.ignore( std::numeric_limits<streamsize>::max(), '\n' ); } [/code] Now if you want to pause, just use the function: [code=C++] int main() { …

Member Avatar for Duoas
1
13K
Member Avatar for python_dev

I know nothing about APPE. Everything I found online refers to weaves and knits... ??? In any case, it appears to be a server error. Check that the server you are connecting to actually supports APPE. (I know Medusa doesn't.) If you actually know what half this means, you know …

Member Avatar for python_dev
0
571
Member Avatar for kylcrow

Consider how a block cipher works. In this case, you need three inputs to apply the encryption. I presume (and hope) that your professor has covered a block cipher in class. As you haven't described the cipher here, I'll just pretend that you know how to use it. So, you …

Member Avatar for kylcrow
0
139
Member Avatar for MKQ

C was designed with the BCPL concept that the programmer knows what he is doing, even if he wants to shoot himself in the foot (or, in C++, blow his whole leg away). This design structure led to the problem is that it is not always possible to keep track …

Member Avatar for Duoas
0
84
Member Avatar for blcase

It is because you are not calling the default constructor. Use [inlinecode]Movie a;[/inlinecode] (without parentheses). I can't remember the reason for this, but I've read it somewhere. Give me a minute to look it up.

Member Avatar for Narue
0
2K
Member Avatar for veronicak5678

You can tell because it is looking for a function that takes two arguments, both (std::string&)s. However, the documentation for strstr() says that each argument must be a (char *). Fix it by extracting the (char *)s from the (std::string)s: [inlinecode]a=strstr(string1.c_str(), string2.c_str());[/inlinecode] There is, BTW, a C++ way to do …

Member Avatar for veronicak5678
0
455
Member Avatar for Duoas

Hi all. I know this is an odd question, but I'm hoping someone else out there knows how to do this. I've just installed Kubuntu 7.10 (which I like), but Debian seems to have messed around with the startup a bit... I've replaced my /etc/console-setup/boottime.kmap.gz file with one that changes …

Member Avatar for Duoas
0
259
Member Avatar for gaurav2589

Erm, stacks and queues are [I]very[/I] useful, [I]very[/I] basic, and [I]very[/I] well-used data structures. To clarify what [B]mohanrobin[/B] said: For a [B]stack[/B], you have a list that you can add items to and remove items from, but only to or from the end (or "top") of the stack. A [B]queue[/B] …

Member Avatar for venkat.malasani
0
98
Member Avatar for IIMarckus

I disagree. [URL="http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.5"]I'm not alone[/URL]. You may also want to read [URL="http://www.cprogramming.com/tutorial/namespaces.html"]here[/URL]. You shouldn't program to avoid learning things. The [I]purpose[/I] of namespaces is to encapsulate your code into logical units and avoid name collisions. The [B]using[/B] statement explicitly defeats that purpose. So, the question should be: [I]when is it …

Member Avatar for IIMarckus
0
141
Member Avatar for driplet

The problem is that a1, b1, time, and amount are all defined as double, and your routine wants a *pointer to* double. Call as: `Runthrough(&a1,&b1,&time,&amount);` Since this is C++, you could prototype your function as void Runthrough(double &from, double &to, double &when, double &howmuch) { ... } then you could …

Member Avatar for Duoas
0
136
Member Avatar for Allen 0108

Two system() calls, two shells executed. If you want to run more than one command then use system() to execute a shell script. I know nothing about the Symbian OS, but I do believe that there should be some sort of command shell on it?

Member Avatar for Adrian99420
0
111
Member Avatar for Lynxus

Everytime an application is terminated, all the variable's values are lost. You can "remember" things between invocations a number of different ways. On Windows, the two most common ways are: [list=1] [*]By using the registry [*]By using a file [/list] Number 2 would be simpler for you right now (but …

Member Avatar for Duoas
0
195
Member Avatar for shadowfire36

I think your professor is an idiot and a jerk. Tell him that an IDE is an "Integrated Development Environment", meaning that it is [I]at least[/I] a compiler and a nice text editor. Tell him also that if he has further problems with your choice of a compiler he can …

Member Avatar for WaltP
0
959

The End.