Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Does the folder have anything in it? If not then just delete it. If there are files, check to see if there is an uninstall program. Since there is not anything in control panel/programs then it is probably safe to just delete the folder. I'd rename it to something else, reboot and wait a week or so to see if any other program misses it, or if some other program re-creates it.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Best if you just ask 7zip forums yourself

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Several ways to do that, all of them require basic understanding of C and/or C++. If you are using VC++ 2010 Express or newer you can create Windows Forms which is based on the language CLR/C++, similar but different than standard c++.

If you use Code::Blocks then you can use one of their windows packages, but I've not used them.

Or you can do it the hardest way and code in pure win32 api functions. No c++ needed for these, all are C function calls and most MS-Windows compilers support them. This will require six months to a year learning it well.

Regardless of which you choose, that project is probably not something you could complete in a timely manner for school projects unless you have lots and lots of time to devote to study, experimenting and debugging the code.

Best way to get started is at amazon.com -- buy a book or two on the GUI system you choose.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You are attempting to mix two different languages -- c++ and CLR/C++. Since you are using CLR/C++ (Windows Forms) then you must use System.io.File class instead of <iostream> and <fstream>. Forget about using standard c++ header files, they don't work with CLR/C++. Other container classses are in the compiler's include/clrext folder.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The edit box that appears after the Related Article

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

in other words be muslim).

Wong. Be Christian. If you don't believe in Jesus Christ then you will most likely burn in Hell for all eternity (there are a few exceptions).

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

By the way, our Conservative government is trying to put an end to publicly financed campaigns

Who is going to pay the bill then? Answer: taxpayers. Don't you already pay enough taxes with all that free (?) medical care? It's not really "free" because you pay for it with your taxes.

It's not our system/government that's corrupt, just some of the people in it. It's a world-wide problem, not just in North America.

What do you consider interference?

Any law which violates our US Constutional rights, such as the right to own and keep guns.

Do you consider passing laws to disenfranchise millions of predominantly black voters in order to win elections to be interference?

Not interference just unconstitutional. AFAIK there are no such laws left in the USA, they have all been abolushed years and years ago.

Your government went to war in Iraq based on a lie. How many are dead because of that lie? Does that not count as corrupt?

Stupidity yes, corruption no. President Bush didn't send us into that war alone, nor did he do it for the money. I dare you to prove your charges of corruption. Post links to relevant criminal investigations.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Another related problem: When the code snippet error message shown in the previous post is displayed it also shows this error in the editor that was not used

The Message field is required.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I tried to make a post without code snippets of any kind in Geek's Lounge and got this error message

The code snippet in your post is formatted incorrectly. Please use the Code button in the editor toolbar when posting whitespace-sensitive text or curly braces.

I found out that it's because I tried to post this line: Deleted that line and it posted without error.

cor·rupt/kəˈrəpt/

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You are far more likely to die from a gun in states with the laxest gun control laws.

You are far more likely to die of heart disease then from a gun. In 1990 33.8 million people died in automobile accidents -- where's your outrage and suggestion to ban automobiles from our roads?

I don't like your use of the word "corrupt". According to dictionary

Adjective:
Having or showing a willingness to act dishonestly in return for money or personal gain.

I don't mean to imply there is NO corruption in our government, that's why we have checks and balances. But to say the entire government is corrupt is unfounded.

> So you are in favour of the government controlling peoples\' lives

To some extent, yes. I am in favor of putting criminals behind bars and the death penalty for certain crimes. I'm not in favor of government interference in the lives of ordinary law-abiding people.

hey (Republicans) were responsible for things like the Partiot Act and designated free speech zones.

It was the Democrates who first set up free speech zones during the democratic national convention of 1988.

During the 1988 Democratic National Convention, the city of Atlanta, Georgia set up a "designated protest zone"[5] so the convention would not be disrupted. A pro-choice demonstrator opposing an Operation Rescue group said Atlanta Mayor Andrew Young "put us in a free-speech cage."[6] "Protest zones" were used during the 1992 and 1996 …

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

As for int 3, forget it.

Yes, because the operating system won't let your program execute interrupts. The processors on Intel based computers do not allow normal programs to use int instructions.

Here is more info about int 3 if you are really interested.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I've also noticed that every since Dani upgraded to the new forums. There were a lot of threads that indicated Dani was the last poster, but if you go to the last post in the thread she is not there.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Necroposting -- I had to look that one up.

Its nothing new -- people have been doing that for years. I haven't noticed any increase on DaniWeb in recent weeks.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I'd like to know where Reverend Jim got his number because its a lot different from the one I quoted.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

@Ezzaral: where did you find that quote? According to the link below there were only about 9,000 deaths by firearms in 2010.

However, the figures themselves are astounding for Brits used to around 600 murders per year. In 2010 - the latest year for which detailed statistics are available - there were 12,996 murders in the US. Of those, 8,775 were caused by firearms.

http://www.guardian.co.uk/news/datablog/2011/jan/10/gun-crime-us-state

One is more likely to die from heart disease then gun deahs. Heart disease and cancer account for about half the deaths in USA. Gun deaths isn't even in the top 10 causes of death.
http://www.cdc.gov/nchs/fastats/deaths.htm/

Our tax dollars would be better spent trying to solve heart disease and cancer instead of something so insignificant as gun control.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Question - what is the justification for owning an assault rifle capable of firing 5-60 rounds per minute?

None. I already said I thought they should be banned.

Question - why is it that buying two packages of Sudefed at a time is enough to get you on a watch list but6000 rounds of ammo is not?

Maybe he's a bad shot :) Agree with you on that one too. I favor putting reasonable limits on the quantity of ammo that can be purchased/kept by individuals without some justification for it. I doubt the NRA would agree with that though.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

pass them just like you would any other variable

 void foo(int matrix[][5])
   {

   }

   int main
   {
       int matrix[10][5];
       foo(matrix);
   }
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Is it your belief that the more handguns that are in circulation the safer everyone is?

Absolutely yes. At the same time I'm in favor of ban on assult weapons because they have no other purpose than to kill people.

I agree that all those situations you mentioned are unfortunate (for lack of a better word), but government can not control every aspacect of people's lives, as the discussion in this thread illustrates. When government tries to control our lives everyone complains about losing freedoms, yet when government does nothing people complain that goverment should do more to control our lives. Which way do you want it? Damned if they do and damned if they don't. If you want government to control your life then move to China. Sure USA is far from perefect, but its probably the best on the planet. Why do you think so many people attempt to enter the USA each day, legally or illegally. If our government was so awful why does USA has the largest immegration in the world (see this link)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Blame a medical condition rather than a corrupt system.

What system do you mean? Who says its corrupt? Just because you think so doesn't make it so. And what do you think the President should or can do about it? There is little anyone can do to keep someone from walking into crowded theater and start shooting, with the possible exception of using metal detectors like those used in airports. How far are we willing to go to prevent this type of incident every few years? Should be put armed guards at the entrences of every public place, such as bars, restaurants, theaters, nightclibs, etc ? Are you willing to fork out another two or three billion dollars per year for it?

As for this shooter, I'm all for death penalty in such incidents, mentally ill or not.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

why do you have a loop? There is no need for it in your example.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Scientists say the world is made up of protons, nuetrons and electrons. They forgot to mention morons. (Seen posted on Facebook)

codeorder commented: If that isNot the .secret.of.Me., Then it defines everything that I live for.:) +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

you need to use an intermediate integer.

int a,b,temp;

temp = a
a = b
b = temp

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

what is line 21 supposed to do? What it actually does is copy the contents of a single character from one buffer to another. There is no need to copy the input buffer, just use it directly in the remaining code.

If think you will have to write two functions that duplicate standard C library functions. They will be needed so that you can extract the fields from the line just read and put the values in the structure. They would be easier for you to write if you wrote a small test program that just tests the function, that way you can get the algorithm down right before putting the code in your final program.

  1. atoi() -- to convert string to integer
  2. strtok() -- extract a substring that is terminated by a given character such as a comma.
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The problem is that you are using a very very old compiler that was intended for MS-DOS 6.X, not modern MS-Windows. Those old MS-DOS programs had very limited memory and stack space, no data objects could exceed 64K, and your array is too large. There is no solution to the problem other than using a modern C or C++ compiler, such as Code::Blocks with MinGW compiler and VC++ 2010 Express (both are free). I realize that colleges in India are 30 years behind the curve and still teach programming with Turbo C, so if that's where you are at then you can't change compilers. Its a pitty that India colleges and universities are so terrible especially when they could easily get modern compilers for free.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The program exits because main() did not wait for the thread to complete its task. You need to create a mutex then call pthread_cond_wait()

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
struct process{
    int processId;
    int burstTime;
    int arrivalTime;
};
const int maxprocesses = 10;
struct process p[maxprocesses];

...
...
// initialize variables
int smallest_burst = p[0].burstTime;
int smallest_burst_index = 0;
int smallest_arrivalTime = p[0].arrivalTime;
int smallest_arrivalTime_index = 0;

for(int i = 1; i < maxprocesses; ++i)
{
   if( p[i].burstTime < smallest_burst)
   {
       smallest_burst = p[i].burstTime;
       smallest_burst_index = i;

   }
   // now do the same test for arrivalTime
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

How to use fgetc() to read the file one charactger at a time. Note that chrLetter should be int not char because fgetc() returns int.

int chrLetter;
while( (chrLetter = fgetc( pfilInput ) != EOF)
{
   strBuffer[Index++] = chrLetter;
}

If you are not required to use fgetc() then I'd suggest fgets()

while( fgets(strBuffer,sizeof(strBuffer), pfilInput) )
{
   // blabla
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

It looks like all you get is the library's source code. You will have to compile the library yourself to generate the *.lib or *.dll

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

'\n' ( 0x0D hex) represents the value of the Return key that you press on the keyboard. You should become familiar with the data found in ascii charts such as this one. Find 0D in the hex column then look in the Description column where you see "Carriage Return"

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You might try Sane's Monthly Algorithms Challenges written for beginners through advanced programmers. Warning! Warning! requires some thinking.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Its not necessary to sort the array because you can sort on only one of the structure members. Just delete all that code from lines 39 to 66, its wrong anyway.

Instead of sorting, just loop through the array and find the indices with the smallest value. Do you know how to do that with a simple integer array? If yes, then this should be a piece of cake for you because its the same idea, except that you need to find two values, not just one. You will need 2 integers, one to hold the index of where the smallest burst time was found, and the other to find the index of where the smallest time was found. You can find both values in the same loop.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You should never ever use gets() because it will allow you to enter more characters then the buffer can hold, excess characters are just scribbled all over memory and your program will crash. There are a couple ways to avoid that problem

  1. fgets() -- e.g. fgets(name, sizeof(name), stdin); The problem with fgets() is that it may append '\n' to the end of the string, which your program will have to remove. If '\n' is not present at the end of the string that means there are more keys in the keyboard buffer which your program needs to flush out.
  2. scanf() -- e.g. scanf("%20s", name);
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

what compiler are you using? Did you try using your compiler's debugger to find the problem? If you don't know how to do that then right now is a good time to start learning how to use it.

Can't you just call the standard C function atof() to convert a string to float? Or are you required to write your own function?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

What exactly do you want that if statement to do?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

If this is a school assignment you might not want to use stricmp() because its non-standard and may or may not be supported by your instructor's compiler.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
main(nargs, args)           // I haven't seen this MAIN signature since
int nargs;                  //    1985! AFAIK, this has been deprecated 
char **args;                //    for over 30 years
 {

Would you believe some people still write code in that style? I've seen in recently (10 years or so) in some libraries, which were probably started 25+ years ago.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

if ((&chouseing_alphabet[0] == abc[0])

Why are you trying to compare the address of a variable with the value of another variable? abc[0] is not an address. If you only want to compare the two characters then remove the & address operator.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You should study this thread to find out how to flush the input stream. And you need to add cin.get() after line 5

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

cin.fail is not used to keep the screen open -- it is used to simply test to find out if cin succeeded or not. If you want to keep the screen open call cin.get().

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I thought gcc is a C compiler, and you need g++ to compile c++ code, but this says I'm wrong about that. gcc just calls g++ for c++ programs.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I can't help you with converting to java, but if you expect anyone to actually read your program you need to format it better. Make liberal use of spaces to make your code easier to read. For example, here's the first few lines of your program

#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <string.h>
#include <ctype.h>

void append();
void list();
void search();
void modify();
void del();

struct employee
{
    int no;
    int sal;
    char gen;
    char name[20];
};

int main()
{ 
    int a;
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

virtual functions allow derived class to override functions in base class(s). When the base class calls a virtual function the top-most derived class function is called. If you have a base class called Animal and a derived class called Dog, when Animal calls virtual function Speak() the function in Dog will get called. You can have another derived class called Cat, in that case Speak() from Cat will get called.

There also is something called "pure virtual" function. Its the same as simple virtual function except the base class does not implement it, one of the derived classes is required to implement pure virtual functions.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Here is the one I installed, you want the first link in the list

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Depends on what you mean by "remove". If you just want to change the nonalphas to something else then use the previous suggestion. Otherwise if you have to move the remaining charactes around to fill up the gaps then you need to create a loop to look at each character. If the character is nonalphabetic then call memmove() to move all remaining characters left one byte. For example if the 7th character is nonascii

char string[] = "Hello 1 World";
memmove(&string[6],&string[7], strlen(&string[7]));
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

MinGW now supports version 4.7.0

I just installed the latest and greatest -- it's up to 4.7.8

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Sounds like its related to this thread

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

It depends on the operating system you want to use. On MS-Windows you need a c and/or c++ compiler, such as free Code::Blocks with MinGW compiler or VC++ 2010 Express. On *nix you can use free gcc or g++ compilers.

You can create/compile programs for other operating systems by using a compiler called "cross compiler".

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

All you need to do is divide the program in two halves ...

Too complicated for such a small program. Another example of hitting a nail with a sludge hammer.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Yes, the default value of global variables is 0, that's not an error message. And the compiler is warning you that you did not put any code within the body of function main. That's also not an error. What compiler and operating system are you using?

I don't know why it compiles without problems in one program and not in the other. Maybe there is a problem with one of the lines above the array declaration. Post the entire program that is causing the messages so that we can see what you did.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Here is a good wiki article about preprocessor directives.

As for your program. This may compile, but it won't work because it's recursive. main() should never be called by your program.

int fun( int foo() )
{

    return foo();
}

int main()
{
    fun(main);
}