5,676 Posted Topics

Member Avatar for eranga262154

[QUOTE=eranga262154;428681]I wrote one as follows. [CODE]string line; ifstream fileread ("[I]path to the binary file[/I]"); while(! fileread.eof()) { getline(fileread, line); cout << line << endl; } fileread.close();[/CODE] Well I read a binary file using this, the command prompt is really mad. It,s not displays as a binary code, I mean bunch …

Member Avatar for eranga262154
0
324
Member Avatar for iamthwee

[QUOTE=iamthwee;277446]I don't know, perhaps you can ask dani to change it? In fact it wouldn't be such a bad idea if it were got rid off altogether. Hmm, oh well.[/QUOTE] I have. No support.

Member Avatar for Hamrick
0
383
Member Avatar for amishosh

[QUOTE=amishosh;429051]One more thing... Forget threads for a moment. My wife runs a business with many customers and contacts, and needs a database type application. I want to put my C studioes into practice. Will this be a good practice for me or a waist of time?[/QUOTE] Eating a bunch of …

Member Avatar for Ancient Dragon
0
103
Member Avatar for Dave Sinkula

[QUOTE=Chaky;428324]I want to be nearly The Quee..... King of Daniweb.:zzz:[/QUOTE] That's a lofty goal for [I]an unknown quantity[/I] :icon_wink:

Member Avatar for Chaky
0
88
Member Avatar for Tight_Coder_Ex

[QUOTE=Tight_Coder_Ex;426653]That being said, Intel is quite liberal with their documentation so there is no reason M$ couldn't have an equal or better compiler.[/QUOTE] There's a good reason. They're M$. This generation's IBM. If they could program like they market, you'd be right. But all they really have going for them …

Member Avatar for WaltP
0
143
Member Avatar for Lost in Code...

[QUOTE=Lost in Code...;426429]I found out what the deal was.... instead of creating a new source file, i created a new project. When creating a new file, my tool writes this in the file as part of the template: [CODE]system("pause");[/CODE][/QUOTE] Edit the template to get rid of that awful command. I …

Member Avatar for WaltP
0
197
Member Avatar for Mdizzle

Actually, you don't need to understand allocation at all. The instructions say: [QUOTE=Mdizzle;425006]The file contains 10 columns and many lines. ... It is assumed that number of students is no more than 100[/QUOTE] So all you need is an array of 100 lines of 10 columns. If you know structures, …

Member Avatar for rohit_hegde
0
125
Member Avatar for murschech

It used to be. Try asking at [url]http://www.borland.com/newsgroups[/url]. Someone there should know...

Member Avatar for bdj
0
594
Member Avatar for Salem
Member Avatar for joydsouza90

[QUOTE=iamthwee;425263]The problem is unlikely to be with their code but rather ... you're using the outdated version of turbo c, which is probably very likely :)[/QUOTE] So you claim that the [I]outdated[/I] versions of C/C++, like Turbo, never handled strings correctly? :icon_rolleyes: Or is it that after new versions came …

Member Avatar for WaltP
0
9K
Member Avatar for ramavundela

In general, you have to assign a specific date to be your ultimate beginning date. Then you calculate the exact number of days from that day to the day entered by the user. Then you can calculate the day-of-the-week from that value using the [I]modulus[/I] (%) operator.

Member Avatar for WaltP
0
136
Member Avatar for Chaky

It's a secret message you're to authorized to read... :icon_twisted:

Member Avatar for ndeniche
0
139
Member Avatar for nayr055

At the end of your code, you have [code=c] cout<<"\nPlease enter +,-,*, or / and then two numbers,\nsepperated by spaces, that you wish to\nadd,subtract,multiply,or divide.\n\nType e and press enter to exit."; cin>>choice; if (choice != 'e') { calc(choice); } } [/code] This will only run the calculator once. Change the …

Member Avatar for Hamrick
0
188
Member Avatar for Ahmed Padela

Or use an older compiler, like [url=http://bdn.borland.com/article/21751]Turbo 1.01[/url] or [url=http://bdn.borland.com/article/20841]Turbo 2.01[/url].

Member Avatar for jwenting
0
226
Member Avatar for MidiMagic

Create your post in an editor. When done, copy and paste the entire post into the edit box. Hit PREVIEW and fine tune your post. Simple.

Member Avatar for MidiMagic
0
344
Member Avatar for eXceed69
Re: 51

[QUOTE=joshSCH;355378]haha.. I was just joking.. I'm a realist.. So I've got to say that no, I do not believe we have made any contact with other life forms. [/QUOTE] Why is being a [I]realist[/I] counter to life forms contacting us? There's some logic missing here... [QUOTE=christina>you;355456]Yeah, I don't believe in …

Member Avatar for Rashakil Fol
0
516
Member Avatar for teddymon

looks fine up to main. But because of the lack of code tags, I can't tell what's going on after it. Try reading [url=http://www.daniweb.com/techtalkforums/thread78223.html]this[/url] for your next post, or the words on the input box background that you ignored when you typed over them.

Member Avatar for Salem
0
92
Member Avatar for WaltP

Dani, could we have a control panel option to shut off the mouseover display please? The display really gets in the way, covering multiple posts so we can't see what other posts are available. I for one find it extremely annoying.

Member Avatar for WaltP
0
91
Member Avatar for asilter

[QUOTE=asilter;423873][code] 105(decimal) = 01101001(binary) [/code]for example, i want to skip first 3 bits of binary and get the number to the right and assign it to an integer:[code] 01001(binary) = 9 (decimal) [/code]could you plz give a little code sample? thanx.[/QUOTE] Set a mask to clear the first 3 bits: …

Member Avatar for WaltP
0
257
Member Avatar for rowly

Actually, I don't understand it, either. The shifting and adding 64 makes no sense. Since a deck has 52 cards, the loop is going through all the possible cards of the deck (0-51). Then [INLINECODE](i / 13)[/INLINECODE] gives you 0-4, representing the suit of the given card. [INLINECODE](i % 13)[/INLINECODE] …

Member Avatar for WaltP
0
124
Member Avatar for plusplus

Or add a progress bar or textbox to the modal form to display the progress. As an added safety, disable any 'dangerous' buttons while the command is being executed.

Member Avatar for plusplus
0
98
Member Avatar for EnderX

[QUOTE=~s.o.s~;420361]This notification thing is killing me. [/QUOTE] Let me kow when the funeral is.... :icon_twisted:

Member Avatar for MidiMagic
0
160
Member Avatar for sjewenp

Looks like someone still hasn't read [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]the Rules[/url] yet. And [url=http://www.daniweb.com/techtalkforums/thread78223.html]this[/url] is also very helpful.

Member Avatar for WaltP
0
86
Member Avatar for NycNessyness

[QUOTE=Hamrick;418691]Pointer strings always end with a '\0' character so calling strlen to find the end just slows the whole function down. This is a good pattern to get in the habit of using. [code=c] for ( i = 0; s[i] != '\0'; ++i ) { /* Do stuff with the …

Member Avatar for Aia
0
464
Member Avatar for Arctic wolf

[QUOTE=Arctic wolf;417995]And when I replace the double variables with integer ones it suddenly beggins to work(there is a huge bug with that,but it works) ,maybe somebody can explain?)[/QUOTE] The only way this can happen is the file contains integers, not doubles.

Member Avatar for Arctic wolf
0
305
Member Avatar for pokemon123

What [B]wee[/B] is saying in his own way is you [I]must[/I] do something before we can help you. All we can do with the info you've given is write it for you. Please read [url=http://www.daniweb.com/techtalkforums/thread78223.html]this[/url] as well as [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]The Forum Rules[/url]

Member Avatar for iamthwee
0
98
Member Avatar for khalidxa

My advice is to tell us what the errors are. the more you explain the problem, the better (and faster) we can help you solve it.

Member Avatar for pradeepk
0
107
Member Avatar for Dani

[QUOTE=happygeek;412567]It isn't, at all, just the opposite. We rely upon members such as yourself reporting bad posts and spam to help us keep on top of the problem. I am discussing this with Dani to see if anything can be done... However. It should be noted that the drive behind …

Member Avatar for Dani
1
989
Member Avatar for zandiago

#1: Please learn to [url=http://www.gidnetwork.com/b-38.html]format your code[/url] so we can read it. #2: You added a line to the input file. Where did you add the [I]read[/I] for that line?

Member Avatar for zandiago
0
2K
Member Avatar for Ptarila

[QUOTE=Ptarila;413392]how do i build a graphical user interface in visual c++[/QUOTE] [QUOTE=iamthwee;413421]Since you never mentioned OS I'd go for OpenGL.[/QUOTE] How many OS's does Visual C++ work under? Another DUH moment... :icon_wink:

Member Avatar for Ancient Dragon
0
110
Member Avatar for dionie

Yes, you can get [url=http://www.daniweb.com/techtalkforums/thread78223.html]help[/url] here.

Member Avatar for WaltP
0
71
Member Avatar for nubbie

[QUOTE=nubbie;413266]i'm suppose to key in 2 value , but need to display error whenever character is entered. thus end the program. can i still able to string all of them?[/QUOTE] You've been given 3 examples. Maybe you should try to [I]use [/I]one of them.

Member Avatar for WaltP
0
122
Member Avatar for crunchie

And Opera is now free, and updated. May be worth another try.

Member Avatar for MidiMagic
0
178
Member Avatar for gopi kannan

[QUOTE=JRM;411696]A word of advise... Use a post title that asks a real question and "texting English" is frowned upon here.[/quote] Almost. Don't ask the question in the title, tell us what the question is going to be about, like "[I]Compiler Error[/I]". [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]Read this[/url] [QUOTE=JRM;411696]I am not familiar with your compiler, …

Member Avatar for WaltP
0
217
Member Avatar for EnderX

[QUOTE=EnderX;300570]That's the problem. I'm not sure if what I have is source code or not; that line makes me think it is, but the vast majority of the file weighs in against the sourcecode theory.[/QUOTE] Why would you think it's source code? You claim most of the file is unreadable. …

Member Avatar for jbennet
0
165
Member Avatar for zandiago

[QUOTE=zandiago;403631]Why am I receiving the following errors: 'seenBefore' : function does not take 1 arguments[/quote] [INLINECODE]bool seenBefore(int, [B]int *[/B]);[/INLINECODE] [QUOTE=zandiago;403631]syntax error : missing ';' before '}'[/quote] Depends on where the error is. This is why we ask you to post the [I][B]exact[/B][/I] error message, in full!

Member Avatar for Lerner
0
417
Member Avatar for John A

What would be used to decide that there's code? The only script I've seen is for C/C++ and looks for {, which means if your post includes a brace but no code, you have to put code tags somewhere anyway... And what criterion would be used for other languages? I …

Member Avatar for John A
0
267
Member Avatar for GaryD.

[QUOTE=GaryD.;411744]about the fflush, I know its wrong but I guess since I'm a beginner it's easier to just tell me to use that while learning the basics since portability will be an issue later...[/quote] And after you've learned to use it, and after time forget that it's wrong, what are …

Member Avatar for GaryD.
0
95
Member Avatar for sk8ndestroy14

[QUOTE=sk8ndestroy14;363409]I'm going to Cedar Point next Friday with my Physics class. It's great cause there are no lines. Everyone's at work or school. But their new roller coaster The Maverick messed up on one of its last test runs. It won't be running for a month so we won't get …

Member Avatar for ndeniche
2
2K
Member Avatar for tformed

[QUOTE=tformed;409263]I am working off the code that the professor provided, but for some reason I cannot get it to work. It is giving me errors. --- the error I recieve are the following: 1>source.cpp(5) : error C2653: 'xy_coordinate' : is not a class or namespace name 1>source.cpp(7) : error C2065: …

Member Avatar for ~s.o.s~
0
226
Member Avatar for The Dude
Member Avatar for The Dude
0
42
Member Avatar for hinduengg

[QUOTE=darkscript;400613]The idea here is to make each character in the string exist in every position, for example: string is "JOY" so taking J:- 1st pass: "JOY" 2nd pass: "OJY" 3rd pass: "OYJ" taking O:- 1st pass: "OJY" 2nd pass: "JOY" 3rd pass: "JYO" taking Y:- 1st pass: "YOJ" 2nd pass: …

Member Avatar for hinduengg
0
1K
Member Avatar for The Dude
Member Avatar for vemanamar

It's because in the code [code] void someStrFunc(const char *str){ char *tmp; strcpy(tmp,str); return; } [/code] [INLINECODE]tmp[/INLINECODE] is just a pointer and has no space assigned to it. Therefore you are copying the string into unknown memory outside of your program space. The same thing is happening with [code] int …

Member Avatar for Salem
0
134
Member Avatar for wonder87

[QUOTE=dr4g;404287]You can also use system("PAUSE"), [/QUOTE] NO!!! [url=http://www.gidnetwork.com/b-43.html]Here's why[/url] [QUOTE=dr4g;404287]DevC++ puts this in for you automatically, [/QUOTE] Only if you don't correct the template, which IMAO everyone should do. [QUOTE=dr4g;404287]i'm not sure about linux at all since i don't need to use it on Linux :)[/QUOTE] And here's one major …

Member Avatar for Aia
0
124
Member Avatar for go939

[B]long[/B]s are numbers [B]""[/B] is a string constant You can't mix the two.

Member Avatar for Bench
0
132
Member Avatar for christina>you

[QUOTE=christina>you;395183]Anyone ever heard of this crazy "magician?"[/QUOTE] Of course. [QUOTE=christina>you;395193]Yeah. He's so fake I think. Or he's been practicing witchcraft.[/QUOTE] Neither. He's a [url=http://en.wikipedia.org/wiki/Magician_%28illusion%29]magician[/url].

Member Avatar for hbk619
0
794
Member Avatar for Salem
Member Avatar for howdoyoudothat?

[QUOTE=howdoyoudothat?;399403]whats a .dat file?[/quote] Generally a [B]dat[/B]a file, used to hold info a program is to process [QUOTE=howdoyoudothat?;399403]whats a .dll file?[/quote] A file that a program loads while running to add additional functions and procedures. In essence, a set of a system functions that are available to the program that …

Member Avatar for stymiee
0
101
Member Avatar for sk8ndestroy14

Well, the opposite of PRO is CON. So opposite of PROgress is ...

Member Avatar for sk8ndestroy14
0
257

The End.