2,867 Posted Topics

Member Avatar for RexxX

Probably because you're outputting the 'char' as a 'char array'. [code=cplusplus]printf("The first char is %s\n", fchar);[/code] Try changing [icode]%s[/icode] to [icode]%c[/icode]. Some other things... - [icode]fchar[/icode] should be an integer. This way, you guarantee that it can hold an EOF character when the end of the input buffer is reached. …

Member Avatar for Aia
0
221
Member Avatar for Sailor_Jerry

If your computer has been compromised, you should do a complete reformat and reinstallation of the operating system, the only thing that you should backup is data. The reason for this is that hackers may have installed root kits, trojans, and other programs that pretend to be your normal applications …

Member Avatar for Sailor_Jerry
0
116
Member Avatar for dophine

This is the important part: [quote]Since the prefix and postfix ++ operators can have two definitions, the C++ language gives us two different signatures. Both are called operator++(), but the prefix version takes no parameters and the postfix version takes a dummy int.[/quote] In other words, if one didn't have …

Member Avatar for dophine
0
140
Member Avatar for aircraft

Could you post this code in a bit more context? Also post the source code of [icode]count()[/icode].

Member Avatar for aircraft
0
99
Member Avatar for imnolongerhere

Please use [URL="http://www.daniweb.com/forums/announcement8-3.html"][B]CODE[/B] tags[/URL] in your code. You typed right over the watermark that explained how to use them.

Member Avatar for WaltP
0
92
Member Avatar for ivay14

Please use CODE tags when posting code. Their usage is explained in the watermark that you typed over when you wrote your post, and in the announcements in this forum. As for your problem, it's very simple. Change this line from: [code=cplusplus]if ( a[i] < a[j] )[/code] To: [code=cplusplus]if ( …

Member Avatar for John A
0
146
Member Avatar for gallantmon1

>Can anyone tell me what's wrong with the code? Why don't you tell us what doesn't work?

Member Avatar for Aia
0
119
Member Avatar for Theanthropical

You should have one overall do...while loop with all your other submenus nested inside with their own do..while loops. This way, when the menu selection has finished its processing, it will loop back to its parent menu (or in the case of the main menu, exit).

Member Avatar for John A
0
202
Member Avatar for maui_mallard
Member Avatar for maui_mallard
0
56
Member Avatar for RINJE
Re: Hi

Hi, and welcome to DaniWeb. I'm glad you've found this site helpful.

Member Avatar for Serunson
0
67
Member Avatar for curt1203
Member Avatar for curt1203
0
250
Member Avatar for forumdude123

The Mac OS X EULA is pretty clear about this subject: [quote]2. Permitted License Uses and Restrictions. A. This License allows you to install, use and run one (1) copy of the Apple Software on a single Apple-labeled computer at a time. You agree not to install, use or run …

Member Avatar for John A
0
96
Member Avatar for hyperzero4

[QUOTE=hyperzero4;536378]I know how to open the file from a program I found online: [code] // reading a text file #include <iostream> #include <fstream> #include <string> using namespace std; int main () { string line; ifstream myfile ("word.txt"); if (myfile.is_open()) { while (! myfile.eof() ) { getline (myfile,line); } myfile.close(); } …

Member Avatar for John A
0
4K
Member Avatar for makesense

My guess would be that you don't have a Java Runtime Environment setup on your system. It's most likely in the YaST repositories, so start up YaST and search for Java Runtime Environment (JRE). Once you find it, install it, and it should set up your Java environment correctly. If …

Member Avatar for makesense
0
173
Member Avatar for T-Mac1
Member Avatar for cynnaminkisses

Creating Trojans to mask the presence of monitoring software falls under the "Keep It Legal" rule in place here. Despite your personal situation, I don't think anything positive will come from this thread, and I also think it's in DaniWeb's best interests to prevent discussion on this subject. If a …

Member Avatar for John A
0
91
Member Avatar for icewizard

The best method is just to make a header file for every source file. Source files aren't really supposed to be #include'd anyway, for the very reason you had your error.

Member Avatar for John A
0
262
Member Avatar for linux

>I need instructions for shrinking /dev/sda1 GParted can resize ext2 and ext3 partitions. Read the documentation if you need more information on this (although the program UI is pretty straightforward). >as well as creating the other two partitions Use the "New" button/option in GParted, with the free space selected. Again, …

Member Avatar for John A
0
102
Member Avatar for mrjoli021

Just curious, but what are the contents e-mail.h and e-mail.cpp? (Abbreviate it if it's a bit long.) You don't need *.lib files because you're not using an external library.

Member Avatar for John A
0
98
Member Avatar for Just a beginner

[QUOTE=ithelp;536060]Not that easy, I guess you need to parse a complex expression like a+b-c*d and evaluate, you need to learn about binary search tree, and about postorder traversal ,etc.[/QUOTE] Not necessarily. If it's just a simple calculator program (as the original poster seems to be implying), then the program itself …

Member Avatar for John A
0
92
Member Avatar for iamthwee

I'm probably just going to go skiing with some friends. It's not a big deal for me.

Member Avatar for joshSCH
0
395
Member Avatar for nh20v

If you still have your OS X installation disk, you can most likely repair your system. Boot off it by inserting it into the disk drive, and holding down the 'C' key while the computer starts up. After you enter the installation program, from the 'Utilities' menu, choose 'Disk Utility'. …

Member Avatar for John A
0
117
Member Avatar for neclark2

It's not an error. Windows automatically closes console applications once they're finished. To pause the program before it quits (so you can view the console output), put [icode]getchar();[/icode] at the end of your program.

Member Avatar for DangerDev
0
117
Member Avatar for John A

Would it be possible to disable smileys within [noparse][icode][/noparse] tags? For example, [icode]MainNamespace::[b][/b]SystemClass::[b][/b]sca[b][/b]red::[b][/b]PThread();[/icode] Turns into [icode]MainNamespace::SystemClass::scared::PThread();[/icode] Okay, exaggerated example. But you get the point.

Member Avatar for Dani
0
184
Member Avatar for JRM

Don't know, but since you don't have the source code, regardless of whether it's C/C++ or not, why post in this forum? Perhaps the *nix forums would be a better place for this thread. Oh, and I kind of doubt you can migrate the executable, unless you maybe use a …

Member Avatar for vijayan121
0
149
Member Avatar for The Dude

Internet Explorer 7 works excellent and is a much-needed upgrade to the IE 6 series. In particular, tabbed browsing is nice, its performance is good, and it actually looks half-decent. The fact that you had so many problems with it is probably because a) you don't know how to use …

Member Avatar for Selwyn
-2
178
Member Avatar for jeeny

If you're referring to kernel drivers (modules), you can list the currently loaded modules with [icode]lsmod[/icode].

Member Avatar for jeeny
0
84
Member Avatar for linux

Register at [url]http://vmware.com/download/player/player_reg.html[/url] which will provide you with your free serial number. Don't bother with the RPM as this is meant for Red Hat-based systems and probably won't work on Ubuntu.

Member Avatar for John A
0
192
Member Avatar for orangejuice2005

I apologize, I'm kind of jumping into this thread without having read the rest of it, but you're using iterators wrong here: [code=cplusplus]if(*it->expo == *it2->expo && *it->var == *it2->var)[/code] The *'s are unnecessary. To access a member using an iterator, just do [icode]it->member[/icode]. Also, here: [code=cplusplus] r.co = *it->co + …

Member Avatar for Duoas
0
2K
Member Avatar for Pankaj21
Member Avatar for e2brute

Hi, and welcome to DaniWeb. If you have another Mac and a firewire cable, you might be able to use Target Disk Mode. Connect the Macs with the firewire cable, start the Mac that works, and once that's booted up, start the dead iBook, holding down the 'T' key. If …

Member Avatar for e2brute
0
110
Member Avatar for knewc

First, read stickies and readmes scattered liberally around the forum. In particular, you seem to have missed the readme on [URL="http://www.daniweb.com/forums/announcement8-3.html"][B]CODE[/B] tags[/URL]. Grab several variables from the standard input using multiple inputs. The user can enter them all on one line (whitespace-separated), or they can enter each one on a …

Member Avatar for John A
0
96
Member Avatar for aircraft

>can I combine int main() and void main() in 1 programming.?? Yes. Use the former, stop using the latter. [url]http://www.cprogramming.com/faq/cgi-bin/smartfaq.cgi?id=1043284376&answer=1044841143[/url]

Member Avatar for John A
0
31
Member Avatar for RexxX

>and I'm sure it's not right. Nope. [icode]fread()[/icode] returns the number of successfully-read elements. You need to convert the char from buffer into an integer. If you'll take a look at an [URL="http://www.asciitable.com/"]ASCII table[/URL], you'll see that characters are just decimals. You'll also see that numbers are stored as decimals, …

Member Avatar for John A
0
115
Member Avatar for John A

I think we've all observed the trend of eye candy incrementally increasing in the user interface of consumer operating systems, particularly the commercial ones. Vista's Aero and OS X's Aqua are perfect examples: both use large amounts of transparency, and contain "sparkle" in the windows designed to enhance a user's …

Member Avatar for jbennet
0
467
Member Avatar for guitarrick

You should really consider using arrays for some of your data. For example, you could create an array that contains the number of days in each month. Your advance_date() function would be considerably simpler: [code=cplusplus] day++; // check to see if this is the last day of the month if …

Member Avatar for guitarrick
0
267
Member Avatar for jimJohnson

It's times like this where I think it would be simpler to use a function. Follow the previous advice of WaltP, creating a [B]while()[/B] loop. This function will keep looping until the user enters a non-negative integer. [code=c++] int getPositiveInt() { int value = -1; cin >> value; // keep …

Member Avatar for jimJohnson
0
150
Member Avatar for evilseed187

It looks like you learned an important lesson a bit painfully: [B]always back up[/B]! I don't know what happened to them, but if the only copy you had of them was supposedly in the zip file you sent your teacher, I'd say it's your own fault you lost all your …

Member Avatar for Nick Evan
0
94
Member Avatar for wolverine_ramir

>How to locate the text file What do you mean by this? Do you mean "open" the file when you already know the name? Or are you searching for a text file on your hard drive? >How to input values in that text file >How to read the texts in …

Member Avatar for John A
0
152
Member Avatar for Sgt. Pepper

And you're likely experiencing problems with the std:: namespace. Try prefixing [icode]cout[/icode] and [icode]endl[/icode] with [icode]std::[/icode]. Or, if you don't like doing that, just add [code=cplusplus]using namespace std;[/code] after you include <iostream>.

Member Avatar for John A
0
169
Member Avatar for rit7777

In the future, if you've found that your thread or another thread is posted in the wrong forum, please flag it for the moderation team to move. Posting a question more than once violates the "keep it organized" rule and is harder for the mod team to keep track of. …

Member Avatar for jasimp
0
115
Member Avatar for The Dude

I'm shocked that you care enough about this to post a poll about it. Well, actually, not shocked. Just disappointed.

Member Avatar for bumsfeld
-1
175
Member Avatar for maui_mallard

If you had all the money in the world, how would you expect to find a market in which you could buy a house?

Member Avatar for Anonymous86
0
150
Member Avatar for maui_mallard

I've got everything from calculator manuals and tuxedo buttons to fungal cream and foreign currencies. The only thing I keep clear is a path to my monitor so I can see what's on my screen.

Member Avatar for bumsfeld
0
113
Member Avatar for PcPro12

Okay, I don't know if you're trying to install Linux alongside Windows (so you can dual-boot), or whether you've completely erased Windows and are trying to create a purely Linux-based system. In any case, I'd recommend the following setup for your Linux partitions: [LIST] [*]A swap partition that will be …

Member Avatar for PcPro12
0
212
Member Avatar for smithwmg1

I'm not using Firefox right now, but I believe it has a 'save link as...' option in the contextual menu that results from right-clicking on a link. [edit] I've moved this thread to the Web Browsers forum so it's more relevant.

Member Avatar for MidiMagic
0
120
Member Avatar for newport

[code=cplusplus] case 4: quotient = num1 / num2; if( num2==0){[/code] Shouldn't you be checking to see if [icode]num2[/icode] is 0 [I]before[/I] you divide? After all, that's most likely what's causing your program to segmentation fault. And you should change your [B]if()[/B] statement into a [B]while()[/B] statement so that it keeps …

Member Avatar for rhish.franks
0
198
Member Avatar for thodragon

[QUOTE=thodragon;530904]"You don't get the grade", "that's charity". Next thing is to send me your bank account!! I asked for help. Do you know what does the word "help" mean? What am I saying? You are mr smart guy, of course you know. I didn't make you to do it. I …

Member Avatar for thodragon
0
137
Member Avatar for The Dude

The way you're reacting to it right now seems to indicate that you're more of a "baby" than the members who are giving you the negative rep. In any case, what you don't seem to realize is that firstly, rep is not meant to be taken seriously. It's designed to …

Member Avatar for Narue
-1
253
Member Avatar for memo_c++

The End.