|
Can anyone tell me what \-> comment does? Does it simply include the library during compile-time?Thanks.
read this
|
Can anyone tell me what \-> comment does? Does it simply include the library during compile-time?Thanks.
read this
I hope everyone has a great newyear's party tonight. I just got a glimpse on TV of the New Year fireworks display that Austrilia put on. Wow! It was a glorious display. We usually have similar displays all over the USA. When I was a kid in 1950s we used to have televised lots of parties at various large clubs and live big bands such as Tomy Dorsy. Sad but they are all gone now and so are all those parties. Seems that young people today just don't know how to party, party, and party some more.
>>the user has diskless client PC on which java video pages are shown for entering data
A project I worked on for several years had a server and several dump terminals. The server computer (a PC) had up to 32 devices attached to serial ports such as scales (weighing devices), barcode scanners, and large character printers (this was on assembly lines in factories). The information was collected by the server computer formatted for display then sent to the dumb terminals along with other information.
I think you will probably have to do something similar. Attach all the weighing devices to the server computer, format the java pages with the information then send it to the diskless PC for display. When something is weighed the scale will send the weight to the server computer, assuming you have a scale that can do that. At the time we used Accu-Sort scales.
>>i don't have access to the server
You will have to get access to the server. Or replace the diskless PCs with normal PCs so that it can run the program that collects information from the scanner.
One way to do it is by using standard C function printf()
int n = 123;
printf("%X", n);
whats confusing is that when i create the output.txt file manually and not by having it created using the
system("mycommand>output.exe")
function and then type in the the same output i would get from mycommand.exe , thestrcmp(error,str)
would then detect the matching lines properly!
That indicates the text generated by the system() function is not the same as what you type manually, could be as simple as a space, tab character, or capitalization. Load both files up into Notepad and compare them side-by-side to see what are the differences.
what compiler are you using? resource.h must be in the same directory as the project *.cpp or *.c files.
It isn't necessary to manually add line numbers to your code when you use code tags.
Sorry, but it is illegal for someone to give you their key.
I use free avast on Vista Home Premium and seems to work as well or maybe even better than some programs that cost $$$.
Sorry, I know nothing about it either. Your fingers can type on the keyboard in google just as good as mine. Just because I'm a moderator doesn't mean I have to do your work for you.
I can't tell what's wrong. You need to use your debugger and put a break point on that if statement so that you can see the value of the variables. The probalem is most likely somewhere else, such as using uninitialized variables in those structures.
how is RemoveQ declared? Does it actually return a Flight object or a pointer to one?
Post the Flight structure.
and what do you mean by "it doesn't work"? It doesn't compile? what are compile errors?
I'm supprised there is anything left of cambodia after the USA got done bombing the hell out of it in 1969. Apparently that was a complete waste of money and time for us as it seems to have accomplished nothing.
You do what you want but I wouildn't be caught dead without antivirus running and scanning both the browsers as well as email. Allowing so much as even one virus can completly wipe out your computer and maybe steel your identity, costing you pleanty of money and time to fix. With free virus scanners that danger isn't worth it.
By your own definition it would be the fattest inhabitants.
Which is probably USA -- see the UTube link I posted for more proof of this :)
why don't you start doing your own research. What have you tried so far.
If you drink a lot of beer then european.
If you drink a lot of beer then you get too fat :)
lol..
Well said. Has anybody read that book by John Gray? Really, everyone must read it atleast once. :) Some really helpful stuff for improving/developing interpersonal relations.
I was hoping someone would make the connection :)
fgets() adds the '\n' to the string because its in the keyboard buffer along with all the other keys that you type.
fflush(stdin) is non standard -- the fflush() function is only intended for output streams, not input streams, although some compilers use non-standard extension. In any event, fflush() does not affect the input by fgets() function because fgets() removes everything up to and including the '\n' character assuming there is room for the characters in the input buffer.
how about fstream file_op("c:\\test\\output.txt",ios::in);
line45: buffer2 = fopen("students.txt", "a+");
the semicolon after remove have error. :(
see my post #13 above
got error after remove it the ';' semicolon...
sorry, wrong line number. should be line 42.
The reason for the wierd behavior is because fgets() appends the '\n' from keyboard input to the end of the string, so you need to remove it. Here is one way to do it
void fixup(char *s)
{
if(s[strlen(s)-1] == '\n')
s[strlen(s)-1] = 0;
}
...
fgets(newS[i].iN,(sizeof newS[i].iN),stdin);
fixup(newS[i].iN);
Just call fixup() after each fgets() to strip out the '\n' character.
void main()
That is a big no-no. main() always returns an int so it should be declared int main()
. Just because your compiler may accept void doesn't mean it is correct.
line 45: remove the semicolon at the end
>>Is window vista is good version of its family
yes
>>u need a good graphics card and lots of harddisk
Its really cheap now. If you can't affort the few dollars to upgrade then don't install Vista.
>>and i think that it doesn't support to MS DOS also.
No version of Windows since Windoes NT 4.0 has supported MS-DOS. Sure, they all have command windows, but that ain't MS-DOS.
>>some of my friends using the vista and they are not satisfied with this vista family!
There are a lot of games that will not work in Vista, so in that regard I have to agree. XP had the same problem when it first came out, but game manufacturers eventually got around to supporting XP and they will do the same with Vista. I have my computer set up to dual boot XP and Vista so that I can play my favorite games on XP becuse Blizard has no intention of upgrading them.
see lines 71 and 72 -- you have way too many spaces there. Remove all those spaces and I'll bet the gender will appear on the same line as the name. Its only a display thing -- the lines are too long so the os wraps them around.
If you want to create fixed length fields for the data then use the field-width specifiers in the print statement. printf("%15s", name);
will print the name in a field of 15 characters left padded with spaces. use "%-15s" and it will be right padded with spaces.
>>can anyone give me the source code?!
Yes. But you have to show your effort first. Post what you have done to solve those problems.
hi, i am to planning for a device driver please if u have the info about that please reply me
Didn't you even bother to read the replies to this thread??? Salem already provided you the links and all you have to do is read them.
Wow! This is one old thread that's worth bumping :)
Got search-engine-phobia or something?
http://www.google.co.uk/search?q=Simplified+Data+Encryption+Standards&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
Yup that's how I found my link too -- its the very first one in the google list and has source code.
I'm from Mars. My wife is from Venus.
>>can any body help me to convert this code from C++ to C
put $5,000.00 USD in my PayPal account and I'll do it. No guarentee that it'll work though.
This is the contents of the file that I got after correcting the program
Index Number Name Gender
11228ADIA Alice Lim F
12233ADIB Mike Chan M
13244BASD Bobby M
43134QWER Cheh Yen Lun M
56354VBFG Choong Wen Loong M
47344FGKJ Chin Pau Soon M
Melvin
M
Sandra
F
#include<stdio.h>
#include <ctype.h>
#define size 99
void maintenance();
struct newI{
char iN[9];
char name[50];
char gender;
};
int main()
{
FILE *buffer1;
buffer1 = fopen("students.txt", "w+");
fprintf(buffer1,"Index Number Name Gender");
fprintf(buffer1,"\n11228ADIA Alice Lim F ");
fprintf(buffer1,"\n12233ADIB Mike Chan M ");
fprintf(buffer1,"\n13244BASD Bobby M ");
fprintf(buffer1,"\n43134QWER Cheh Yen Lun M ");
fprintf(buffer1,"\n56354VBFG Choong Wen Loong M ");
fprintf(buffer1,"\n47344FGKJ Chin Pau Soon M ");
fclose(buffer1);
printf("File students.txt created!!!\n");
maintenance();
return 0;
}
void maintenance()
{
struct newI newS[size];
int i=0;
char response;
char response2;
printf("To add new information key \'Y\' else press any key to skip>>>");
response=getchar();
if(response == 'Y' || response == 'y')
{
FILE *buffer2;
buffer2 = fopen("students.txt", "a+");
do
{
i++;
printf("\nFor student #%d",i);
printf("\nEnter student's index number>>>");
fflush(stdout);
fgets(newS[i].iN, sizeof(newS[i].iN), stdin);
printf("\nEnter student's name>>>");
fflush(stdout);
fgets(newS[i].name, sizeof(newS[i].name), stdin);
printf("\nEnter student's gender(either *M* for male or *F* for female only)!!!>>>");
fflush(stdout);
scanf("%c",&newS[i].gender);
getchar(); // flush stdin of the '\n' character
newS[i].gender = toupper(newS[i].gender);
while(newS[i].gender!='M' && newS[i].gender!='F')
{
printf("\nInvalid input for gender.\nPlease reenter a proper gender as shown>>>");
fflush(stdout);
scanf("%c",&newS[i].gender);
}
printf("\nDo you still wish to add more student's information");
printf("\nTo add new information key \'Y\' else press any key to skip>>>");
fflush(stdout);
response2=getchar();
fprintf(buffer2,"\n");
fprintf(buffer2,"%s", newS[i].iN);
fprintf(buffer2," %s", newS[i].name); …
line 39: remove the semicolon at the end
And I'll bet you didn't do it again in front of your mother.
I don't know how Norton does it -- see some of the google links I previous posted (maybe you read my post before I added those links)
what operating system. how is the hdd formatted? You can't do that under MS-Windows without writing kenel-level code because the os won't let you.
You might try one of these ioctl functions
post your code. The cells should be separated by comms, spaces or tabs. Each row separated with '\n'. I would use a combination of stringstream and getline() to read the file and separate its cells.
Something like this which assumes cells are separated with white space. A little different when separated by commas.
std::string line;
std::ifstream in("filename here");
while( getline(line) )
{
vector<string> cells;
stringstream str(line);
std::string cel;
while( str >> cel)
{
cells.push_back(cel);
}
// now do something with the individual cells
}
I already showed you how to do #3. After do that for one line the vector will be an array of 10 strings. If you want to change the 8th element then access it just like any other array tokens[8] = "some other string"
>>after changing one of the tokens save the file (not looked at this part yet)
simply rewrite the tokens vector
for(int i = 0; i < tokens.size(); i++)
{
outfile << tokens[i] << " ";
}
outfile << "\n";
Many films contain sex scenes just to get the R rating and those scenes do nothing to enhance the movie. And as for the hack-and-slash movies -- they are sooo boring. I thought the first Freddy Krueger movie was funny but they got boring after awhile. And I hate the filthy mouths in many R rated movies -- their mother's should have washed their mouths out with soap!
G and PG-13 movies are my favorites. I also enjoy musicals such as Chicago
<Hickup> I'll drink to that :) Happy New Year
After creating the command prompt window you have to add the dev-cpp\bin to your PATH environment then execute make.exe
c:\Dev-C++:>make -f makefile.win <Enter>
The makefile.win should have been generated by the Dev-C++ IDE. If not, then you will either have to learn how to create it manually (its a big pain in the a**) or let the IDE do it for you. Alternatively you can type all the commands in the makefile yourself each time you want to compile the program -- which is another big pain in the rear.
>>I'm not sure how reliable Ancient Dragon's idea would be, as the text (description) is going to change at every line so using find seems non-intuitive here.
I was expecting the OP to actually read his textbook about the find method to see how it works, but maybe I was expecting too much (hint: use find to locate the spaces). However, after some more thought the find method would not have been the best choice anyway.
its easy using stringstream class because it works on in-memory strings like fstream does on file streams so you can use the >> operator to extract each of the individual words
#include <sstream>
...
std::string line = "Name0 1 2 3456 7 8 9 10 \"discription\"";
std::stringstream stream(line);
std::vector<std::string> tokens;
std::string tkn;
while( stream >> tkn)
tokens.push_back(tkn);
When the above finished the tokens vector will contain all the individual words in the string.
>>Borland DevC++
Dev-C++ is not a Borland product.
>>OK not all visuals have it.
NONE OF THEM HAVE IT.
So look for this functions in YOUR compilers. I have all this under Borland and Visual platforms ALL VERSIONS.
VC++ 6.0 -- no
VC++ 2005 Express -- No
VC++ 2008 Express -- No
They all have conio.h but none of them support textattr().