2,839 Posted Topics

Member Avatar for acejames1

To find out how many 'watts' your computer uses, just wack a multimeter between the computer and the poweroutlet and set it to 'current'. Read what the display says and then multiply that by the voltage in your country. You answer will be poweruse in watts. P=I.U

Member Avatar for Ezzaral
0
165
Member Avatar for timb89

This code doesn't do much does it? Why does the user have to input the file for the grid? Is this a startup grid, or is the file meant for ouput when the game is done? You should also think about how to implement the logic of the game. ps. …

Member Avatar for Salem
0
92
Member Avatar for harshchandra

[QUOTE=Narue;674782]with code that would have worked beautifully fifteen years ago[/QUOTE] Not to nittpick, but 'cout' never belonged to the C-language, not even 15 years ago on a Turbo-C compiler :D

Member Avatar for Nick Evan
0
429
Member Avatar for Sukhbir

() isn't a operator. Do you mean function-overloading? [code=cpp] int foo(int bar) { return bar*2; } float foo(float bar) { return bar*2.0f; } [/code] In the above example, I've created two functions with the same name and functionality. But one is for ints and one is for floats => function …

Member Avatar for Narue
0
126
Member Avatar for Maxine

what's a wlc file? Is it [URL="http://filext.com/file-extension/WLC"]power word[/URL]? If yes: It's just a textfile, so open it like this: [code=cpp] #include <iostream> #include <string> #include <fstream> int main() { std::ifstream in; std::string line; in.open("c:\\input.txt"); // check if file is open here // and do something with it's contents return 0; …

Member Avatar for ArkM
0
101
Member Avatar for OmniX

If you change [icode] div.pushback("a");[/icode]to [icode] div.push[b]_[/b]back("a");[/icode], your code should actually produce the output you want.

Member Avatar for iamthwee
0
120
Member Avatar for OmniX

[QUOTE=OmniX;673915]On the topic of pause, you got one for cls? [/QUOTE] [URL="http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1031963460&id=1043284385"]Here [/URL]are a few options. I prefer option 4 myself :)

Member Avatar for OmniX
0
169
Member Avatar for CoolCheech

[QUOTE=camthalion95;641685]CoolGamer48 Beat Me to mentioning shadowrun.[/QUOTE] It took you 3 days to type that reply? :-/

Member Avatar for sDJh
0
143
Member Avatar for sciwizeh

[QUOTE=Ancient Dragon;673095] But with special software (I forget its name) you can run it under *nix too.[/QUOTE] I think you mean Wine. @sciwizeh: you [i]can[/i] make programs with Visual for other Operating systems, but for drawing you should use something like wxWidgets (as Ancient Dragon mentioned) instead of the win32-api …

Member Avatar for sciwizeh
0
172
Member Avatar for Shanti C

[URL="http://www.daniweb.com/forums/thread78250.html"]Here's[/URL] a 13 page thread that covers 'bout everything there is to know about Rep. Enjoy :)

Member Avatar for William Hemsworth
0
87
Member Avatar for Dani

[QUOTE=John A;589297]Here's my list of things I hate: [list] [*]Posting Games [*]Geek's Lounge [*]....... [/list] [/QUOTE] You hate the Geek's lounge, but you have 500 posts in it? Very strange... Anyway: I'd like to add the parsing of smilies in [noparse][icode][/icode][/noparse] tags to the lists of things Example: [noparse][icode][/icode][/noparse] [icode] …

Member Avatar for William Hemsworth
0
998
Member Avatar for cinderella_nez

Why would you want to program it in assembly? AVR-studio can compile C for the 89s51. So the code would look like: [code=c] char i; for (i=99; i >0; i--) { //write 'i' to 7-seg } [/code] Without knowing how you connected everything, that's all I can tell you

Member Avatar for abhisdm
0
551
Member Avatar for kidprogrammer

You should change the "< >" to quotes ( " " ): [icode]#include "bfunction.cpp"[/icode] This means that the file is in de project-folder If you want to use multiple files I would recommend that you use .h files. For example: You have a function [icode]void foo(int number) { }[/icode] You …

Member Avatar for kidprogrammer
0
157
Member Avatar for loken
Member Avatar for Dave Sinkula

[QUOTE=~s.o.s~;651563]Yes, the concept seems to be useful, at least for those who are new to forum based systems though the downside here is that regular posters will have to go through an extra click to post their replies.[/QUOTE] My thoughts exactly. But you could keep the current system for people …

Member Avatar for WaltP
0
123
Member Avatar for Dave Sinkula

Same bug exists in the search-function. I mentioned it [URL="http://www.daniweb.com/forums/post629027-116.html"]a month[/URL] ago. And I think the 60 seconds interval between sending emails is too long. If I see someone spamming, I always 'report bad post'. But I have to wait 60 seconds to report the next spam-message... I don't like …

Member Avatar for MidiMagic
0
249
Member Avatar for Nick Evan

Great work on the new Welcome guide :D Any voices from members in there?

Member Avatar for blanca2
0
91
Member Avatar for bpacheco1227

What he ^^ said. But also this line: [icode] srand(time(NULL)); //seed random number generator[/icode] should be called once and only once. I normally put it somewhere at the beginning of main()

Member Avatar for mitrmkar
0
200
Member Avatar for Quarck

I like VS2008 (VC++ Express) the best. It's free and it's backwards-compatible with VC6. VC6 isn't freely available (to my knowledge). What problems do you have with the new visual IDE? Perhaps we can assist.

Member Avatar for Tigran
0
191
Member Avatar for pavel989

[QUOTE=Salem;650170] But if you're going to use precompiled headers, then EVERY source file needs to look like this [code] /* Every source file needs these headers */ #include <iostream> // just an example /* The precompiled header magic marker */ #include "stdafx.h" /* any header files unique to a source …

Member Avatar for pavel989
0
144
Member Avatar for Wiki_Tiki

Do you mean [URL="http://msdn.microsoft.com/en-us/library/k3bb4tfd(vs.80).aspx"]deployment[/URL]? Here's another [URL="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1790835&SiteID=1"]thread [/URL]on the subject. What version of VS are you using, because I'm not sure if these solutions will work on the Express-version

Member Avatar for Wiki_Tiki
0
95
Member Avatar for manzoor

Or you could download the [URL="http://msdn.microsoft.com/en-us/vs2005/aa718668.aspx"]90-day tria[/URL]l of Visual Studio Pro. After the 90 days, you can decide to buy or uninstall.

Member Avatar for manzoor
0
117
Member Avatar for nav33n

Yeah, cause we all know gremlins eat positive reputation :D I've noticed the same bug. It has been that way since you can view 'all your rep'. But if the gremlins want to eat the newest rep, that's fine with me.

Member Avatar for nav33n
0
90
Member Avatar for Lukezzz

[QUOTE=Lukezzz;654671] [code] vector<vector<vector<string[COLOR="red"]>>>[/COLOR] [/code] The 2D compiles and I have tried to follow the pattern for the 3D but I have a lot of compilererrors with the 3D.[/QUOTE] You should write it like : [icode] vector<vector<vector<string[COLOR="red"]> > > [/COLOR]abcde; [/icode] (with spaces between the >>>.) Else the compiler will think …

Member Avatar for Nick Evan
0
2K
Member Avatar for OmniX

The answer would be vectors: #include <iostream> #include <vector> using namespace std; int main() { const int maxsize = 9000000; vector<int> lst; lst.resize(maxsize); for(int i = 0; i < maxsize; i++) lst[i] = 0; return 0; } To add array's, you could use a vector of vectors, or a [map](http://www.cppreference.com …

Member Avatar for OmniX
0
506
Member Avatar for AnnYzz
Member Avatar for AnnYzz
0
130
Member Avatar for The Dude

The bar isn't long enough for my clicking skills.. [quote] Near Death - Delusions of Godlike power[/quote] (I play (hardrock)guitar, so I have a lot of speed in the fingers on my lefthand :P )

Member Avatar for Epic Tissue
0
97
Member Avatar for Brent.tc

[QUOTE=Brent.tc;653957]Thanks Salem![/QUOTE] It took you 7 months to reply ? :-/ :D

Member Avatar for Nick Evan
0
243
Member Avatar for raja289

[QUOTE=Adak;650352] 1) get input, either from file, or from the user, using fscanf(), or scanf(). [/QUOTE] A bit of-topic, but a moderator (WaltP) once wrote [URL="http://www.gidnetwork.com/b-59.html"]this [/URL]article about scanf(), it's worth the read. (also click the other parts about scanf) For the rest I completely agree with your post!

Member Avatar for raja289
0
411
Member Avatar for Nemoticchigga

What Ancient Dragon said ^^, But don't forget do [icode]delete ptr[];[/icode] once you're done with it. Or else you'll get a memoryleak.

Member Avatar for Ancient Dragon
0
101
Member Avatar for hiddendragon

[QUOTE=camilojvarona;653235] I've found a workaround you just need to initialize the array first like this. [icode]int arrays[1][/icode] and then you can do like this [icode] arrays[arrayLength];[/icode] [/QUOTE] If you mean that you're doing something like this: [code=cpp] int a[1]; a[2] = 9; cout << a[2]; [/code] then I can only …

Member Avatar for titaniumdecoy
0
2K
Member Avatar for brizhou

As for the first code: instead of this: [icode]if ((number > 99) || (number < 1000)) [/icode] I think you mean this: [ICODE]if ((number > 99) && (number < 1000))[/ICODE] which means that the number has to be between 100 and 999. also: [ICODE]d2 = (num / 100) [COLOR="red"]mod [/COLOR]10;[/ICODE] …

Member Avatar for doddware
0
118
Member Avatar for masterjiraya

Without looking for any other errors, or checking the functionality of your code, I can see that in quad.h you have an extra closing bracket: [code] .... cin >> dy; }; } [COLOR="Red"]<--- remove this one[/COLOR] ~Quadrilateral() // Call Destructor .... [/code] If you used [URL="http://en.wikipedia.org/wiki/Indent_style"]code-formatting[/URL] and [URL="http://www.daniweb.com/forums/misc-explaincode.html"]code-tags[/URL], you could …

Member Avatar for Alex Edwards
0
92
Member Avatar for oliver_mk
Member Avatar for karang

What's the return-value of [URL="http://msdn.microsoft.com/en-us/library/ms646940(VS.85).aspx"]PrintDlg[/URL]()?

Member Avatar for mitrmkar
0
940
Member Avatar for vbCNEW

[QUOTE=vbCNEW;650245]im not sure if i download all file they say... i never found a external libraries they were claiming... is it all the links??? [/QUOTE] I went to clanlib.org and clicked downloads->Win32, Microsoft Visual C++ 8 (precompiled binaries). There's a link [URL="http://www.clanlib.org/download-binaries-win32-vc80.html"]there [/URL]that says: "[B]For the lazy[/B]: All libs required …

Member Avatar for Nick Evan
0
461
Member Avatar for zebanaqvi

- What compiler/OS are you using? - Console app or GUI? - How is the data saved? The next thing would be to save the text at intervals. If your program runs in a loop, you can compare the current time with a preset time to get an interval, or …

Member Avatar for Nick Evan
0
82
Member Avatar for chaoticabyss99

This line: [icode]<< "\nThe cost is $ " << box.calculateCost() [/icode] is probably causing the problem. The function calculateCost() isn't returning anything (void). To solve the problem, you should delete the function declaration from TwoDayPackage and OverNightPackage. The class 'Package' already has a calculateCost-function, so why make 2 more? [edit]Too …

Member Avatar for chaoticabyss99
0
255
Member Avatar for Dannyo329

your statement should actually work. Perhaps you got the path wrong? You could try something like: [code=cpp] system("c:\\mydir\\heres_the_file\\main.exe")[/code] Is it absolutely necessary to open main.exe? I personally don't like the system() command, because if someone would replace the "main.exe" program with a renamed version of "format C: /q" you would …

Member Avatar for Duoas
0
4K
Member Avatar for andrew13d

I started with the Atmel [URL="http://www.avrfreaks.net/index.php?module=Freaks%20Tools&func=viewItem&item_id=115"]STK500 [/URL]starterkit and a [URL="http://www.atmel.com/dyn/resources/prod_documents/doc2503.pdf"]ATMega32 [/URL]uController. It's not that expensive, and you get a few tools (software) with it. Also: it has build in rs232 and some buttons and leds and stuff. Very handy when learning the basics in microcontrollers. I know that some people …

Member Avatar for doddware
0
142
Member Avatar for Fault

[QUOTE=Fault;650315]Hey i have a few random questions that i can't seem to get my head around at the moment.[/QUOTE] This smells like homework to me. And we [URL="http://www.daniweb.com/forums/announcement8-2.html"]don't give away free homework[/URL] here. How about you try to answer the questions yourself and come back with what you have. We'll …

Member Avatar for tecktalk
0
124
Member Avatar for Prabakar

[QUOTE=jasimp;641484]. Only moderators can use animated avatars.[/QUOTE] Actually.... Everyone can use an animated avatar. Look closely at mine for a few seconds ;) (yes it's animated)

Member Avatar for jasimp
0
150
Member Avatar for ambarisha.kn

What Agni said. But if you want to make your life a whole lot easier, use std::strings: [code=cpp] #include<iostream> #include <string> using namespace std; int main() { string buff = "Asto.cfg"; cout << buff << "\n"; if(buff=="Asto.cfg") cout<<"Success"; else cout<<"Fail!!!!"; cin.get(); return 0; } [/code]

Member Avatar for CoolGamer48
0
86
Member Avatar for sangham

[QUOTE=sangham;650382]Friends can i return a list or a map from a function???[/QUOTE] Why don't you just try it? [code=cpp] map<int, string> Foo(void) { map<int, string> Bar; return Bar; } int main() { map<int, string> mp = Foo(); return 0; } [/code] Works? Question answered :)

Member Avatar for Ancient Dragon
0
75
Member Avatar for OmniX

[QUOTE=OmniX;650086] Using <iomanip> and setprecision() but I cant seem to get it to work. Could someone please give me a small example. [/QUOTE] ok: [code=cpp] float a = 0.00012354684; //number has 8 meaningfull digits (skip the first zero's) cout << setprecision (8) << a << "\n"; cout << setprecision (5) …

Member Avatar for Nick Evan
0
116
Member Avatar for KenTheFurry

It sounds like an e-mail bombing program, so you're probably not going to get much help here. (and I'm not discrimination. The fact that you are a furry doesn't matter to me)

Member Avatar for Nick Evan
0
56
Member Avatar for OmniX

[quote=OmniX]There all just C++ compilers, correct?[/quote] No. They are all IDE's (Integrated Development Environments). The compiler is just a part of it. [quote=OmniX]Which one is the best? [/quote] I personally like VC++, it has a lot of very handy features. But the other two programs have a smaller footprint and …

Member Avatar for Nick Evan
0
154
Member Avatar for kv79

[QUOTE=kv79;649660] I am ready for bombarding .[/QUOTE] Time for a moderator?

Member Avatar for Narue
0
120
Member Avatar for Salem

It's horrible, I should neg-rep you for posting this. I'm constantly stopping random pages from loading. My colleagues were not amused :) One add-on I [i]do[/i] like is [URL="http://piclens.com/"]piclens[/URL]. It makes surfing youtube even better!

Member Avatar for nav33n
0
84
Member Avatar for thilakthilak

[URL="http://www.daniweb.com/search/search.php?q=Final+year+Project"]Final year projects[/URL] [URL="http://www.daniweb.com/forums/thread67837.html"]C/C++ practice-problems [/URL] Also: read [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]this[/URL], the part about "keeping it clean"

Member Avatar for thilakthilak
0
89

The End.