2,839 Posted Topics

Member Avatar for zawpai

I'll try one more time: [URL="http://www.daniweb.com/forums/announcement118-3.html"]CLICK THIS BLUE UNDERLINED LINK[/URL] [noparse][code=cpp] YOUR CODE HERE [/code][/noparse]

Member Avatar for Nick Evan
0
321
Member Avatar for lifesuk

[QUOTE=Radical Edward;616846] Ed's code assumes that there won't be any leading whitespace.[/QUOTE] Ed's code also assumes the words on each line won't contain whitespaces :) If Niek would program this, it would look more like [code=cpp] inFile.open("data.txt"); if (inFile.is_open() ) { while (getline(inFile,product)) { if (product[0] != '#') cout << …

Member Avatar for Nick Evan
0
3K
Member Avatar for SACHIN4TCS

[QUOTE=SACHIN4TCS;615884]Write a program that will read in a number from 0 to 9 and spell out that number. The program must also report any values that are out of range.In other words, for an input say 2, output should be two[/QUOTE] SIR YES SIR! [quote=SACHIN4TCS] its very urgent[/quote] Oh dear, …

Member Avatar for sarehu
-1
262
Member Avatar for Salem

I guess I would go for: English (or Dutch, German, etc) Chinese Arabic Why? Because these three are very different from each other. From char-set to idiom and grammar. This would increase the change that someone could translate at least one of them.

Member Avatar for twomers
0
66
Member Avatar for Xokzin

This is [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]not a free homework service[/URL]. You'll have to show some effort before you get help. So post what you've done so far. Or ask specific questions

Member Avatar for Xokzin
0
127
Member Avatar for majestic0110

[QUOTE=nav33n;612257]Cscgal, everytime I see your profile...[/QUOTE] [i]Everytime[/i]? Do do you want a lame remark about that ? ;)

Member Avatar for Dani
0
155
Member Avatar for zoner7

You're right. The two lines are identical. Let's take [icode]for(int i =0 i <10; i++) { //do stuff}[/icode] for example. another way to write this code is: [code] int i=0 while (i< 10) { // do stuff i++; } [/code] As you can see in the code above, it doesn't …

Member Avatar for Abzero
0
277
Member Avatar for majestic0110

An Interrupt handler that took too many clockcycles to finish. So once in n-times it was called again before it was finshed... ( on a uC btw) That gave me a hell of a headache.

Member Avatar for twomers
0
137
Member Avatar for hewara

Please post your code here between [noparse][code=cpp] code here [/code][/noparse] I personally don't like opening attachments [QUOTE=hewara;616070] the result that i want to get is "value of myarray[0]=0.577 or 0.5" and the others value of myarray[1] and value of my array[2] is zero. [/QUOTE] So what value ARE you getting?

Member Avatar for hewara
0
95
Member Avatar for CoolGamer48

Why are you using the C way to read a file and store it's contents? Why not use std::strings, that would solve all your problems! [code=cpp] #include <string> #include <fstream> #include <iostream> using namespace std; [.....] string str_read; ifstream fin("file.txt"); if (fin.is_open()) cin >> str_read; else cout << "couldn't open …

Member Avatar for mitrmkar
0
87
Member Avatar for L31chH4rdT

the >> operator will always discard whitespaces. You could use getline(), which keeps whitespaces: [code=cpp] #include <iostream> int main() { std::string str; getline(cin,str); cout << str << endl; cin.get(); return 0; }[/code] input : [icode]hello world![/icode] output: [icode]hello world![/icode] and in your case you could even use it to loose …

Member Avatar for Duoas
0
311
Member Avatar for Nemoticchigga

You've got a question about that are do you just like posting code? :P

Member Avatar for Nick Evan
0
88
Member Avatar for chrissyln13

First of all: Thank you for using code-tags in your very first post! Good job. Now for your problem: How about sending the data by reference? Here's an example of passing a value by reference: [code=cpp] #include <iostream> using namespace std; void timestwo(double* num) { *num*=2; return; } void addone(double …

Member Avatar for chrissyln13
0
133
Member Avatar for Xokzin

as my signature says: [icode]= != ==[/icode] (= is not the same as ==) in this line: [icode]if (symb = 'E' || symb = 'F')[/icode] you meant: [icode] if (symb [b]==[/b] 'E' || symb [b]==[/b] 'F') [/icode] The first statement says: if (assigning 'E' to 'symb' succeeds) return true The …

Member Avatar for Xokzin
0
85
Member Avatar for nelledawg

[QUOTE=nelledawg;615747]Ok well, I did a little research and duh, forgot about system("pause") AND getch()! Which would be more acceptable to use?[/QUOTE] I would strongly suggest that you use neither. - getch() is only supported by the Turbo compiler (as far as I know anyway) - system("pause") won't work on a …

Member Avatar for Radical Edward
0
161
Member Avatar for Sky Diploma

You should post your compiler errors, but what I see right away: [quote] Date::set_default(9,7,2000); Date S(3,7,1991); [/quote] You call the function set_default before you created the class. And you call the memberfunction the wrong way (Date:: instead of S.) So change the two lines to: [code=cpp] Date S(3,7,1991); S.set_default(9,7,2000); [/code] …

Member Avatar for Sky Diploma
0
149
Member Avatar for banban2008

Where to begin... The code you posted is barely recognizable as C++... I suggest you dump the entire code in the trashbin. I'll give you a small part of the code to get you started [code=cpp] #include <iostream> using namespace std; int main() { int measured = 0, calculated =0; …

Member Avatar for e_pech
0
155
Member Avatar for JoE Guana

What mitrmkar said. You can prevent these errors by indenting your code. Example what you write: [code] int main() { for (int i = 0; i < 5;i++) { for (int j= 0; j < 5;j++) { if (j==i) { cout << "yeah"; } } } return 0; } [/code] …

Member Avatar for VernonDozier
0
218
Member Avatar for Ravenn

[QUOTE=Ravenn;615349] try1.obj : error LNK2001: unresolved external symbol "public: __thiscall L_No::L_No(int)" [/QUOTE] In the class declaration you say: [code] public: L_No(int iNumber);[/code] But there's no definition of this constructor. So add: [code=cpp] L_No::L_No(int iNumber) { // do stuff with int iNumber }[/code] And your code should compile. [QUOTE=Ravenn;615349] if i …

Member Avatar for Ravenn
0
107
Member Avatar for savinki

You probably have something like: [code] char str[] = "hello"; char ch= str; [/code] Then : no. str is an array of chars, so it won't fit in one char. you [i]could[/i] do [icode] ch = str[0][/icode] What are you trying to do? Could you post some code?

Member Avatar for ithelp
0
129
Member Avatar for lalalu

You mean something like: [code=c] char *buffer; buffer = inet_ntoa(address.sin_addr);[/code]

Member Avatar for jephthah
0
105
Member Avatar for camproject

That would be me. What are you working on? and if you'd like more support, join the [URL="http://tech.groups.yahoo.com/group/OpenCV/"]YAHOO! OpenCV group[/URL].

Member Avatar for Nick Evan
0
48
Member Avatar for jamshid

Is it a requirement that you program this yourself? Else I would say: Why not use excel? All the functionality described above can easily be implemented in Excel

Member Avatar for jamshid
0
127
Member Avatar for jonbyrd

E-Books on what? I can't imagine that you bought 600 books on C++ right?

Member Avatar for Nick Evan
0
38
Member Avatar for pinballgeek

If you say that it only works on one revision of a specific MOBO, the change is that they integrated some sort of copy-protection. I think your best shot would be asking Williams for more detail or maybe even the sourcecode (allthough I doubt that they'll give it)

Member Avatar for pinballgeek
0
177
Member Avatar for nagguns

Post the first few errors you get (in detail) and post some code. My best guess at this moment is that you are using some linux-specific functions that can't be found in windows. But without seeing the code, I can't be sure

Member Avatar for jephthah
0
271
Member Avatar for Drake

I'm actually working with a program for a Fujitsu uController at the moment. Written by (with all respect) an old-school programmer. static this, extern that... bleh.. I'm more of a 'throw pointers around' kind of guy :)

Member Avatar for jephthah
0
189
Member Avatar for seeker55

[QUOTE=seeker55;612055]Thanks a million[/quote] Is guess you missed the sarcasm underneath? [quote=seeker55;612055]I know I messed up that's why I'm looking for help now[/QUOTE] To little, to late. How should we know what you have to learn? When are the exams coming up? Don't you have time to ask your teacher for …

Member Avatar for seeker55
0
98
Member Avatar for vikram_sriram16

Correct me if I'm wrong, but that isn't ansi-c right? Anyway, it's platform dependent. But for a Windows system Duoas' solution will work

Member Avatar for jephthah
0
288
Member Avatar for rob_xx17
Member Avatar for jephthah
0
97
Member Avatar for maafipau

[URL="http://en.wikibooks.org/wiki/QBasic/Graphics"]start here[/URL] And come back when you have some code to show that you've made an effort ps. Don't start a new thread on the same subject just because the 'mean computergeeks' here at Daniweb won't give you some free code to cheat you through your class

Member Avatar for Narue
0
385
Member Avatar for toolbox03

open the file, then read it one char at a time. Then use [URL="http://www.cplusplus.com/reference/clibrary/cctype/isdigit.html"]isdigit [/URL]on every char: [code=cpp] string str =""; if (!isdigit(input_char)) { str+=input_char; } [/code] When the loop is done, 'str' will contain your file without numbers.

Member Avatar for Duoas
0
92
Member Avatar for zawpai

After 62 posts and a lot of reminders (I told you 3 times already) you're still not using code-tags. Edit your post and put the code in [noparse][code=cpp] //your code here [/code][/noparse] tags. Did you even read the error message? It says it can't find main(). Now look in your …

Member Avatar for zawpai
-1
148
Member Avatar for Triggerhappy41

Thank you for using Code-tags! If your not changing the any of the values in the Class (card) c, why would you want to pass by reference? To make it easier for yourself, how about: [code=cpp] ostream& operator<<(ostream& out, Card c) { out << c.getSuit(); return out; } [.....] int …

Member Avatar for Triggerhappy41
0
145
Member Avatar for Traicey

[QUOTE=Traicey;612264]... and for some reasons I cant open the files... [/QUOTE] That looks like an excellent place to start. How about just posting the code for opening files?

Member Avatar for Nick Evan
0
78
Member Avatar for timdog345

So this is a working program? It's all commented out, so it probably doesn't do very much. Perhaps you could tell us what this is supposed to do, instead of dumping a lot of code here with the title "just in case you wanted to know". If you call it …

Member Avatar for Nick Evan
0
131
Member Avatar for liaozhenkui

[QUOTE=Serunson;611693]Wilkommen nach Daniweb! (Welcome to Daniweb!)[/QUOTE] Actually it's Wilkommen ZU Daniweb. Nach and Zu both mean 'to', but 'nach' is used when you say: 'I'm going TO' (Ich gehe nach) and 'zu' is used when saying: 'Welcome TO' (Wilkommen zu). It's German by the way

Member Avatar for Nick Evan
0
79
Member Avatar for Ancient Dragon

Yesterday I got it for the first time ever. I run XP with Firefox 2

Member Avatar for Nick Evan
0
228
Member Avatar for zawpai

Please post your code here instead of giving it as an attachment. I'm not going to open a zip file of 1.04 MB, that should contain code. 1.04 MB of text is rather much. So just post your cpp file(s) here and be sure to use [noparse][code=cpp] //code here [/code][/noparse] …

Member Avatar for mitrmkar
0
160
Member Avatar for cebubinary

Free ones: [URL="http://msdn.microsoft.com/en-us/express/future/bb421473.aspx"]Visual Studio 2008[/URL] (click Visual C++) [URL="http://www.codeblocks.org/downloads"]code::blocks[/URL] [URL="http://www.bloodshed.net/download.html"]bloodshed devc[/URL] I recommend the first two, because they're still being upgraded and improved

Member Avatar for Nick Evan
0
253
Member Avatar for bindiK

>>I need solution to this immediately. .... >>Its urgent Sorry it took so long but here it is: [code=cpp] #include <iostream> int main () { char a='c',c[3],b=a; std::cout << ++a << (char)((a&b)+21) << b << (char)(a+(7*sizeof(char))); a = 0x6F; b = (char)(sizeof(int)*sizeof(int)*sizeof(int)+50); memcpy(c, "ll", sizeof(char)*sizeof(c)); std::cout << b<< a<< c; …

Member Avatar for Nick Evan
0
126
Member Avatar for Ancient Dragon

And if you want a newline behind an icode line, you have to give an extra enter: [icode]cout << 1;[/icode] hello In the inputfield ; the line above was 2 lines. (I gave an enter behind the icode line) [icode]cout << 1;[/icode] hello In the example above I had to …

Member Avatar for Nick Evan
0
218
Member Avatar for toolbox03

[QUOTE]The problem is with this line:[/QUOTE] What is the problem with that line? After 27 posts you should know that you should use CODE-tags when posting code. So read [URL="http://www.daniweb.com/forums/thread78223.html"]this [/URL]about code-tags and problem-description. But since I'm in a good mood, I've thrown your code in my compiler and the …

Member Avatar for Nick Evan
0
146
Member Avatar for cobaltbass

[QUOTE=Sky Diploma;610431]You can also use Character Arrays [code] char title[30]; cin.getline(title,30); [/code] This will even take in spaces between words too.[/QUOTE] Too 'C' for me. How about combining the two posts and do it like: [code=cplusplus] string title; getline(cin, title); [/code] Now we can still use std::strings AND it takes …

Member Avatar for Nick Evan
0
111
Member Avatar for DimaYasny

Here's a [URL="http://tldp.org/LDP/abs/html/"]link [/URL]with a tutorial I'm currently fighting with. In [URL="http://tldp.org/LDP/abs/html/writingscripts.html"]Appendix M[/URL] there are a lot of exercises ranging from easy to hard.

Member Avatar for eggi
0
131
Member Avatar for wellibedamned

[QUOTE=wellibedamned;611538] kinda doesn't work... anyone knows why? [/QUOTE] [edit] AD solved that problem already [/edit] Anyway, if you're using C++, why not use std::strings, find() and substr()? Demo: [code=cpp] #include <iostream> #include <string> int main () { std::string str = "This is a line of text"; int lastspace= str.find_last_of(' ') …

Member Avatar for Nick Evan
0
82
Member Avatar for Nick Evan

For some time now, the images attached to posts have been unreadable. I never thought of this as a problem until I realized that when people aren't using code-tags, I always refer them to this [URL="http://www.daniweb.com/forums/thread93280.html"]thread [/URL]. But since the images are mutilated beyond recognition, this thread won't teach newbies …

Member Avatar for Ancient Dragon
0
356
Member Avatar for timdog345

* Applauds * Do you have a question? If the question is: why doesn't this work, then the answer is: because it's all comment ( /* */ )

Member Avatar for Nick Evan
0
146
Member Avatar for e_pech

You are designing a MicroController and writing your own compiler for it?? But you don't understand how to search for words in a file? hmm... Behold: The amazing powers of [URL="http://www.google.nl/search?hl=nl&q=changing+font+color+richedit+mfc&btnG=Zoeken&meta="]google[/URL] The first and third link look promising

Member Avatar for e_pech
0
102
Member Avatar for FTProtocol

[QUOTE=John A;611212] I'd recommend this one, written by one of our moderators here: [url]http://www.gidnetwork.com/b-61.html[/url][/QUOTE] What he^ said. But if you want to go the full 10 yards: [URL="http://www.daniweb.com/forums/thread90228.html"]click[/URL] . It's written by another Moderator.

Member Avatar for Nick Evan
0
148

The End.