342 Posted Topics

Member Avatar for andyg55

I would put the variables in their own parenthesis's. (x1-x2) . This looks like it might be some asymptotic equation. So the question is if the difference will EVER be less than that value. Otherwise you might be waiting a very long time for the loop to terminate.

Member Avatar for John A
0
151
Member Avatar for mrjoli021
Member Avatar for VernonDozier
0
87
Member Avatar for inocntreper

...and the address where we should send the completed assignment! I live only to enhance your available"party time".

Member Avatar for JRM
0
94
Member Avatar for gcardonav

It's telling you that it can't find the the first file. You probably need to enter the path in the IDE Second, it saved details of the build attempt in the path specified.

Member Avatar for JRM
0
647
Member Avatar for Grub
Member Avatar for Grub
0
98
Member Avatar for technogeek_42

[QUOTE=technogeek_42;522002]i know that is for c++ but can i ask what is the code of this in vb6?[/QUOTE] Good GOD man! THIS IS A C++ board! When in Rome...

Member Avatar for Ancient Dragon
0
95
Member Avatar for andyg55

your compiler should tell what lines they were on. the first two are simple syntax errors Perhaps the 'int' keyword problem is related to the undeclared variable 'numCols' where you ment to write: int numCols; but wrote int int which would give those exact three. Do a string search on …

Member Avatar for VernonDozier
0
295
Member Avatar for Blythe24

Your question is too vague. For instance, is the sequence always going to linear as in your input sequence 01234567 or does the user have the ability to REALLY mix things up with an input like 90133854 ? If not, then all you would need is the low starting number …

Member Avatar for jazzman05
0
106
Member Avatar for IIMarckus

[QUOTE=IIMarckus;523005]Hey guys, I just have a simple (?) question. What difference is there, if any, between [inlinecode]cin[/inlinecode] and [inlinecode]std::cin[/inlinecode] (for example)? If the latter is better form, why is it so?[/QUOTE] They are the same. however you must bring the cin into scope by one of these ways: using namespace …

Member Avatar for IIMarckus
0
141
Member Avatar for jimmy.rocks1
Member Avatar for Ancient Dragon
0
132
Member Avatar for xeption12

Isn't stuff like that done by setting one variable to zero in order to find the relationship between the the other two, then resubstitute that relationship? You could also do a simultaneous equations matrix. Hope this helps, It's been a while... Hope that helps

Member Avatar for xeption12
0
131
Member Avatar for linux0id
Member Avatar for aaronight

Those are not C++ libraries. nix all of them. Just use <iostream> (no .h) You will also need : using namespace std; //directive

Member Avatar for JRM
0
2K
Member Avatar for damir_john

[QUOTE=Ancient Dragon;521953]dir will just tell you where iw3mp.exe is. You have to copy that directory into the next line. Its possible that it isn't even on your computer. I'm using Vista Home Premium and I don't have it in the windows directory.[/QUOTE] You can also use the "find" function that …

Member Avatar for JRM
0
149
Member Avatar for Jboy05

[QUOTE=Jboy05;521957]Scratches Head:confused: Please have some patience with me im a noob:icon_eek: [B]This is wat the instructions I have to do for IPO[/B] [B]For IPO, [/B] t Absolutely NO C++ code or keyword of any kind should be used (they are not even needed) in Part I of the Assignment. This …

Member Avatar for JRM
0
1K
Member Avatar for eesti44

I guess the best way to start is to have a clear concept of what you are trying to do. I'm not sure from reading the above, but I think the ultimate goal is to make a "person" array that enters and displays personal data in different formats???? If so, …

Member Avatar for Agni
0
217
Member Avatar for programmingnoob

[QUOTE=programmingnoob;518567]sorry if thats what you think..but i really dont understand it..i still have no idea on how start this..anyone that can give me a headstart with this? i think this is quite a sophisticated and way too hard program for my level...[/QUOTE] It is a sophisticated request. How did you …

Member Avatar for programmingnoob
0
132
Member Avatar for dexter1984

[QUOTE=dexter1984;518472]Aaaa I see. I tried putting if ( num != 0) into the while loop and it works! Guess I got to do more examples to get the hang of C++ Btw, the program is an example of using the concept of passing by reference right? Thanks ^^ [/QUOTE] No, …

Member Avatar for JRM
0
203
Member Avatar for rite2bobby

> I can't use loop or i will get a deduction > > What i use is ; > > const string fullname= "Horatio Thadeous Hornblower"; > > string firstname; > > string middlename; > > string lastname; > > int spacePos= fullname.find(' '); > > firstname = fullname.substr(0, spacePos); …

Member Avatar for JRM
0
120
Member Avatar for dbwalters

line 124 looks a bit strange. CatesianPoint is a class, but you are using it like a typedef?

Member Avatar for dbwalters
0
150
Member Avatar for jalo3030

I'll second what Ravenous Wolf had to say: All you need to do is display the results! (oops)

Member Avatar for JRM
0
306
Member Avatar for bis student

Here's a tip GOOGLE is your friend. Whenever you have a "lookup" type question, try Google-ing it first . Enter it like this: C++ continue C++ break You may use this method for any lookup question you may have in the future. It doesn't even have to be limited to …

Member Avatar for JRM
0
132
Member Avatar for HowBil

use a loop to keep gathering data [code] int sum =0; int tank =0; while (cin.get() !="") cin >> tank; int sum =sum+tank; [/code] I'm not sure about the "" though...

Member Avatar for Lerner
0
223
Member Avatar for programmingme

Since adding an interest rate to SOMETHING is a similar task for both checking and savings, it could be presented as an overloaded function. Especially if there were conditions placed on the interest vs. balance in the account, would make sense to do it that way. The simplest invocation might …

Member Avatar for JRM
0
279
Member Avatar for legendarya49

Seems to me that you have a bunch of rouge braces. see commented line below. There is an extra brace between each function! I'm surprised that it compiles this way. Perhaps this is what is confusing the compiler? [QUOTE=legendarya49;511226] [code]#include <iostream> #include <cmath> using namespace std; void addArrays(int array1[], int …

Member Avatar for JRM
0
90
Member Avatar for phalaris_trip

The only thing would suggest is to lose the namespace directive and just list what you use using std::cin

Member Avatar for phalaris_trip
0
88
Member Avatar for greglobal

[QUOTE=greglobal;454529]This method also uses several bitbld methods, so the lag is very high when you try to draw say 5-6 transparent images. Totally, there are 12 bitbld calls which slows down th game considerably. Any other suggestion ?[/QUOTE] Do these images need to move while they are transparent? I know …

Member Avatar for JRM
0
100
Member Avatar for Schmitty27

I am learning C++ myself. looking at this initially, you are using "struct" which has been depreciated in C++ syntax. Secondly, your sort method (I could be wrong about this!) seems that it could give erronous output since ( I believe) it works on comparing ascii value of the names. …

Member Avatar for vijayan121
0
106
Member Avatar for jacques95
Member Avatar for JRM
0
96
Member Avatar for revenge2

[QUOTE=revenge2;443142] please help!!. and what is "int" by the way. I am a little confused[/QUOTE] int = integer which is defining the the variable types, in this case weekdays, as integer variables. You might want to do a little study. This question is almost too basic. Ripping off some else's …

Member Avatar for Ancient Dragon
0
165
Member Avatar for wicked357

> O cout << "The first and third letters in the entered words are: " << static_cast<unsigned char> (list[5].find(list[5], 1, 3)) << endl; cout << endl; } > end quote. I'm drunk at the moment, but I can see a few problems with this code. First, you are out of …

Member Avatar for twomers
0
117
Member Avatar for jarv

Yeah, I think it's called tabbed browsing! If you don't like that, then I guess you'll have to stimulate your creative juices a bit. Anything is possible...IF YOU TRY.

Member Avatar for JRM
0
77
Member Avatar for JRM

hello all, I am trying to compile this canned example in QT4 , but the compiler spews out an error messagethat I have never seen before. The *.cpp file: [code] #include <QtGui> #include "finddialog.h" FindDialog::FindDialog(QWidget *parent) : QDialog(parent) { label = new QLabel(tr("Find &what:")); lineEdit = new QLineEdit; label->setBuddy(lineEdit); caseCheckBox …

Member Avatar for vijayan121
0
205
Member Avatar for gopi kannan

[QUOTE=gopi kannan;411681]i wrote a program in c ++...when i compiled it..the compiler showed limit=215f #00a5....and the program did not get compiled and the ide got closed...i compiled using turbo c compiler...tell me whatz dis??and how to compile my program??the program is around 500 lines...help me...[/QUOTE] A word of advise... Use …

Member Avatar for WaltP
0
217
Member Avatar for JRM

I just started to fool around with QT4. I was wondering how experienced organized the widgets used in GUI's. For instance if I were to use several widget objects in a particular program, is it better practice to make a header file for each function? If I wanted a spin …

Member Avatar for JRM
0
99
Member Avatar for eyedea2011

in the comparison program, the first two prototypes are incorrect. You have the test condition (a,b) which makes no sense. Later on you use it correctly with (a==b). If you took the time to read the compiler errors, you could have noticed this immediately ! I learn allot from compiler …

Member Avatar for JRM
0
125
Member Avatar for cheongsiwei

[QUOTE=Bench;407842]You need to put the [CODE] tags around the area of text where your code is To create a derived class which inherits from Bank is as simple as [CODE=CPP]class saving : public Bank { // saving-specific code in here };[/CODE][/QUOTE] Also, I have some general questions about this entire …

Member Avatar for JRM
0
210
Member Avatar for hinduengg

[QUOTE=hinduengg;400972]I am unable to implement the logic suuceesfully .:sad: So please help !! I really need it.:confused: Hinduengg[/QUOTE] Ok, one code neophyte to another... write the example word JOY on the left side of a sheet: then think of pointing to another "scratch" array. You want the scratch array to …

Member Avatar for hinduengg
0
1K
Member Avatar for JRM

all is not always what it seems. I found out the hard way that there is a very big difference between a copy and a direct assignment . [code=cplusplus] char* a = new char(); char* b = new char(); cin.getline(a,10,'\n'); strcpy(b,a); //ok makes a SEPARATE copy a=b; //This seems to …

Member Avatar for Narue
0
144
Member Avatar for krnekhelesh

[QUOTE=iamthwee;402119]Nah, VS is too bloated and c++.net is horrible. For pure c++. i.e no windows GUI crap, you don't need Visual Studio. And anyway, if you are writing code it is best to test it with different compilers and operating systems to ensure portability.[/QUOTE] Even if you write a "Hello …

Member Avatar for JRM
0
273
Member Avatar for ndeniche

[QUOTE=Nichito;400164]i know i learned it somewhere, but its been a while since i used it... how do you make an user given array size... i mean...[code]int b; cout<<"Input the array size: "; cin>>b; int array[b];[/code] i know this is not hte way of doing it... but just so you get …

Member Avatar for Bench
0
131
Member Avatar for JRM

I added a line to this program to read the length of the the string , then display the test. strlen() is not cooperating! Am I using the wrong function? the compiler says the arg should be char*. I'm confused! [code] #include <iostream> #include <string> #include <vector> using namespace std; …

Member Avatar for JRM
0
179
Member Avatar for pixrix

[QUOTE=Ancient Dragon;399008]No it won't. C++ made several syntax changes such as c++ requires type casts where C does not. [URL="http://david.tribble.com/text/cdiffs.htm"]Here is a more complete list of differences[/URL]. One way to make your code more c++'ish is to replace all printf() function calls with cout that is declared in <iostream> header …

Member Avatar for ~s.o.s~
0
299
Member Avatar for JRM

I was experimenting with a direct method of dereferencing an iterator. It works OK with numbers, cout gets confused (??) when the derefenced pointer is a string? The code was supposed to stuff a vector, then read it out . I hacked up that original to do some troubleshooting and …

Member Avatar for JRM
0
120
Member Avatar for pixrix

Wow! That's some scary looking code you've cooked up! Why don't you grab a copy of the c++ primer or some book like it. Go through it completely before attempting something like this. I think you are just going to confuse the hell out of yourself if you keep going …

Member Avatar for pixrix
0
1K
Member Avatar for radskate360

OK, I've got question! If the program is sorting external files, why define time_t t and time(&t)? I don't see them used in the program.

Member Avatar for Lerner
0
629
Member Avatar for sowmi

I see no definition for public function int SearchCommand() in class FunctionEntry. I suppose that might stop you dead in your tracks!

Member Avatar for vijayan121
0
156
Member Avatar for bops

Gcc compiles many lanuages C++ is one of them. I use codeblocks open source IDE on my (fedora) linux box which works great with Gcc and just about any other compliler out there. If you want something more "linux-y" you might look into Vim for just messing around with code. …

Member Avatar for JRM
0
100
Member Avatar for stonecoldstevea

[code] marks[q] == markofStudent(r); [/code] This should be the assignment operator = the mark of student() function should be int, not void

Member Avatar for JRM
-3
103
Member Avatar for JRM

I'm trying to solidify my understanding of some vector concepts. 1) interators are "smart access" in that they can keep track of the array position and size. 2) the access element operator [] is the "dumb" access to the vector. Also, I was experimenting with ways to dump the contents …

Member Avatar for Narue
0
235

The End.