Why ask a question when the answer is definite and freely available?
They are rhetorical questions -- its the questions themselves that are amusing.
Why ask a question when the answer is definite and freely available?
They are rhetorical questions -- its the questions themselves that are amusing.
>> dictatorships and democries, then turned into discussion about religion, and finally about mathametics
Why finally, dragon? :)
.
I only meant finally up to the point of my post :) I suppose it could take on other branches.
Well and you, Ancient Dragon, should understand the same as well. You in addition to everything blocked your private messages for me
Huh? If you mean I have you on my ignore list ... I don't. I never block PMs -- ever. The initial PM you received was automatically generated by the system when I gave you the infraction. It works that way with everyone. And I think you get other autogenerated PMs when someone edits your posts.
except for asking to leave me alone
I only sent you courtesy PM in reply to the PMs you sent me.
I think you well understand that you can allow yourself anything now, you cut my tongue, and i may not even be able to reply. All the words are meaningless after that.
That really isn't true -- you cut your own toung by posting abusive and malitious language about another member (did you bother to read the Rules ?). Otherwise you are pretty much free to post anything you want as long as it doesn't violate other DaniWeb rules.
>> I
>> Who are you saying is right?
Jail over bad food ... I think there's no question about that who's in the wrong there. I misread and thought the worker was still in prison.
Yes, if it is known that an employee deliberately and malitiously put poison in the food then he/she should be jailed. It would have been murder had the cop died of salt overdose, just as if the employee had put rat poision in the meat.
Its really wierd how threads take on a life of their own -- a discussion began about dictatorships and democries, then turned into discussion about religion, and finally about mathametics. Whew!
Not the express edition ?
without the platform SDK it cant make standard Win32 apps, making it .NET only.
win32 apps are not the same thing as standard c++ programs. The Express edition compiles C and C++ with or without the Windows Platform SDK. If you want to write win32 api programs then you are right -- you have to also download the SDK.
That teaches you C++.NET not real C++
Wrong. It is a c and c++ compiler too and is fairly good at conforming to c++ standards. But I don't suggest it for beginners because the IDE is a little complicated to learn to use.
without attempting to compile the code you posted there is probably at least one semicolon missing at the last brace in the header file.
I've seen it done both ways -- and even seen people mix them. Myself, I prefer listing methods first.
The olympics was awarded to London specifically, not Canada or Australia, although Canada is hosting the 2010 winter olympics.
i am using Vista Ultimate, does this matter?
No -- that error has nothing at all to do with the operating system. Without seeing your code I guess that you left out a semicolon somewhere.
>>ANSI-ISO C++ standart doesn't allow it. Do not believe in Microsoft at 100%
If the standard does not allow the space then the Microsoft compiler is doing it correctly.
>>Keep in mind that the current standard doesn't allow it.
Do you mean it does not allow the space, the space is required, or the space is optional?
That must be a compiler thingy because VC++ 2005 Express doesn't mind it wihout the space.
you header file need code gards to prevent that, like this
#ifndef MYHEADER
#define MYHEADER
// code goes here
#endif
then it might be something else. Post the whole program, if it isn't very large. Take the code snipped you previously posted, put it into another small program and you will see that it is ok.
#include <vector>
#include <string>
using namespace std ;
bool CheckSymmetry(char *File , vector<string>& vertex_set, vector<vector<string>>& edges,vector<string>& char_first)
{
return true;
}
int main()
{
return 0;
}
Smiles list in the advanced edit window often does not work -- it does nothing. Sometimes when it does work the list is generated below the edit window (see thum) and I have to scroll down to see them all . I've noticed this behavior in only the last few days. Using IE7 on Vista Home with the diaplsy zoom size set to 100%, if that means anything.
webcourse.cs.technion.ac.il/234112/Winter2004-2005/en/ho_Download%20Turbo-C.html -
Your link is just a tad late isn't it (by a year or so) ? :-O
Imposible for anyone to help you without more information. Please post your code. Do you get errors when you compile the program or when you run the program ?
getchar is the standard C library function. Borland compiler has many functions that have no standard C library equivalent, such as everything in graphics.h.
I'm starting out...obviously, a newbie here. However, I cannot understand that when I run this code with the first number being 34 and my second number being 40 ....I get the output of 39.
This is not my homework. I'm just trying to learn on my own for now.
Thanks for all you help.
Sincerely,
St!tch.
Move line 8 down to line 21. Code is executed in the order that it appears in the program, which means the two numbers can not be added together until after their values are known.
That function compiles ok for me using VC++ 2005 Express. Maybe you forgot the include files <string> and/or <vector> ?
>>the 2012 olympics are taking place in a really ghettoish part of london (the east end)
Simple solution: either clean up the ghettos or move the olympics to a different part of London.
Don't you need to seed the random number?
Not absolutely required -- if you don't see it then the program will generate the same set of random numbers every time it is run. Seeding only changes that behavior to generate a different set each time the program is run, assuming it uses a different seed such as the return value from time() function.
>>an option would be to use run-time polymorphism.
I thought about that too but dismissed it because it may not work. createandmanipulate() still has to know whether to allocate an object of type Class1 or Class2 before returning. If it allocates an object of only base then the caller will not get what it expects.
Yes, I want to write my own C++ compiler
Good luck :) Unless you have a Ph.D. in computer science and mathametics plan to spend the next 20 or so years writing it.
Its not very clear what you did and what you want. Do you mean you created a structure and saved their contents to a file, now you want to search the file for a specific record ?
If that is correct, then read the file sequentially from beginning to end, one record at a time until you find the record you want to work with. If you want to delete a record you normally have to rewrite the entire file except for the record you want to delete. There are other alternatives but they are a little more complicated and may not be suitable for your assignment or current level of programming skills.
The solution is to make sure you coded that function with exactly the right parameters (in your case the function does not have any parameters). If there is a OnBnClickedBackBtn function make sure it contains the class scope CTryDlg::
(Been there and done that mistake too).
Another excellent tutorial. Its not necessary to use c++ to write win32 api programs and the tutorial in my link doesn't require c++.
>>What does the "i" and the "n" and the "++" represent??
>>Okay so I know the basic C++ stuff
If you new the basic c++ stuff you would not need to ask that question. So I suggest you go back and re-read your text book, and read it as often as necessary until you have a good handle on the basics. I nearly wore the pages of my book out during my first year of programming.
The ++ is a shorthand operator to increment a variable and is the same thing as i = i + 1;
Microsoft probably limits XP to 2 processors because they couldn't make it work with more. I heard about that several years ago that the os would crash often with 3 or more processors and barely works with 2.
Oops! my error -- you are correct that you can not use cin and cout in C. I had c++ in mind. Sorry for that gaff. :icon_redface:
I would use a structure to hold the information for each bowler, then after entering the information sort the array of structures by score. After that print the array information.
struct bowler
{
std::string bowlername;
int score;
int points;
};
also, learn to use c++ cin and cout to simplify your code. you can replace printf() with cout and scanf() with cin.
Is the husband of a woman who is President still called The First Lady ?
The invested interests spend so much national wealth in preparing the Olympic Games to blandish the international, launch so much propaganda about the 2008 Olympics to gloss over official corruption and social inequality!
That could have been said of every nation in the world that hosts an olympics. Boycotting an olympics is stupid political trick. I know it has happened on rare occasions in the past but IMO it should never ever happen again, even if it were hosted by Iran.
Many feel the GDP comes from inflation. houses and food are all more expensive
California, USA, has been exactly like that for the past 50 or so years too. My sister bought a house 25 years ago in southern CA for $120,000 and sold it a year ago for $850,000.
simple solution -- move lines 28 and 42 up to line 7 so that its scope is to the entire function. Also you can't declare a matrix using non-static number of elements. If you don't know the size of the matrix at compile time then you have to allocate the dimensions with malloc()
Installation and use. You may install, use, access, display and run one copy of the Product on a single computer,
such as a workstation, terminal or other device (“Workstation Computer”). The Product may not be used by
more than two (2) processors at any one time on any single Workstation Computer
The way I read it is that you can install a single license of the operating system on only one computer at a time. If you want to install it on another computer you have to remove it from the first. But since I am not a lawyer I could be wrong. I have heard that Vista can only be installed on a single computer. If that computer breaks and you have to replace it then you have to buy another Vista license. If you violate that license agreement then you may not be able to get any updates, patches or service packs from Microsoft.
when BUILD_RELEASE is defined the Debug macro is not evaluated and the function on line 11 of the code you posted will only be executed if a == 0, in otherwords line 11 becomes part of the if condition on line 9, just as if it were written like this:
if(!a)
ControlPlayer();
The function new returns a pointer to the end of the memory block, not the beginning. I think it would work if written like this:
void * operator new( unsigned int iSize )
{
static unsigned char aMemPool[10000];
static unsigned iUsed = 0;
if( iSize == 0 || (iUsed+iSize) >= 10000 )
{
return 0;
}
// get pointer to betinning of the memory block
unsigned char* ptr = &aMemPool[iUsed];
// increment counter to beginning of next memory block
iUsed += iSize;
return ptr;
}
This code has at least two very serious flaws --
(1) because aMemPool is static and has scope only within the operator new, there is no way to release a memory block so that it can be used again. Any given block of memory can only be used once during the lifetime of the program.
(2) the delete operator on line 19 that you posted will not delete the memory allocated by the new operator and will cause the program to crash. In order for this to work correctly you need to write a delete operator and make the memory block public so that its visible to the delete operator. Also using a simple character array like that isn't going to work either because it isn't possible to mark memory blocks as either allocated or free. Allocating memory is a lot more complicated than the code you posted.
what language are you writing the assembler in ? C language ? What have you already done to find the information you are seeking ? As for me, I never had the occasion to write an assembler, so probably can't help you much.
Yes, wrapper is the way to go then just use precompiler directives to conditionally compile depending on the os.
first, that function needs to know the size of each matrix -- don't leave any dimensions unspecified as you did. Your function appears to be derived from the bubble sort -- toss it in the bit bin because it will not work. A transpose function does not need a temp variable nor does it swap variables. You need two matrixes where the number of rows and columns in the result matrix are the opposite of the number in the original source matrix. Thus, you can't leave any of the dimensions unspecified.
If you are unsure exactly what transpore is, read this tutorial. After you understand that, it should be fairly simple to write the program.
ms-windows call GetFirstFile() and GetNextFile(), or in *nix call opendir() and readdir(). If you used c++ you can use boost library that is portable between these two operating systems (I don't know a thing about MAC).
What you need is an array of 10 integers to contain the count of each interval. For example a[0] is the number of random numbers that fall between 1 and 5, a[1] = 6-10, etc. After generating a random number at line 15 use a series of if statements to determine which array element to increment, such as if d1 >0 and d1 < 6 then increment a[0].
line 8: array a should be 10, not 100.
line 10: arrays are always numbered from 0 to the number of elements assigned to the array. So line 10 should look like this:
for(i = 0; i < 10; i = i + 1)
lines 20-25: you need two loops, not one. The outer loop counts from 0 to 10, and the inner loop from 0 to the value of a.
Actually there is a way to automate it completely. I found the site (http://www.nliteos.com/).
someone must have removec the link from that site because its no good any more. :'(
I installed XP 64 on my computer once, and removed it about an hour later because nothing worked. It's now sitting in some garbage dump.