1,171 Posted Topics

Member Avatar for DaveD3

[QUOTE=DaveD3;853388]I have got to say this .NET stuff is very frustrating.[/QUOTE] This frustrating .NET stuff is actually much easier to design a program's GUI in :) ...

Member Avatar for DaveD3
0
106
Member Avatar for kashmir323

Or [URL="http://www.cppreference.com/wiki/c/math/start"]this[/URL] but it's pretty much the same :) ...

Member Avatar for tux4life
0
56
Member Avatar for skisky

[QUOTE=jinsong;852426]tolower() only works on a per char basis, see the man page here. [url]http://linux.die.net/man/3/tolower[/url][/QUOTE] True :) Try something like this: [CODE=C++] void conv2lower(string &s) { for(unsigned int i = 0; i < s.length(); i++) s[i] = tolower(s[i]); } [/CODE] Usage: [CODE]string msg = "HELLO WoRLd!!"; conv2lower(msg); // msg contains now …

Member Avatar for Narue
0
317
Member Avatar for booker

Yeah, I tried this, it was compiling ... I stored a value in it but when displaying with cout it didn't display anything ... You're probably better off with a vector: [CODE] // Create vector< vector<int> > vec(512, vector<int>(512)); // Write vec[2][3] = 10; [/CODE]

Member Avatar for booker
0
190
Member Avatar for spring sun
Member Avatar for cause&effect
0
129
Member Avatar for cassie_sanford

Why are there HTML-tags in your post, BTW, ever heard of paragraphs :P ? It's difficult to read this ...

Member Avatar for siddhant3s
0
497
Member Avatar for ak118

Is this a "do-my-homework" request ? Please show us what you already came up with ... Edit:: There are just so many TicTacToe examples floating around on the internet just use Google ...

Member Avatar for tux4life
0
981
Member Avatar for snoopy198520
Member Avatar for ellimist14

You don't have to specify an array's upperbound if you pass it to a function [ICODE]int fillStruct (ifstream& fin, ROPES ropes[MAXROPES], int n)[/ICODE] change it to [ICODE]int fillStruct (ifstream& fin, ROPES ropes[], int n)[/ICODE]

Member Avatar for ArkM
0
110
Member Avatar for binamy1

On line 80 of your compressor code I encountered this: [ICODE]system("cls");[/ICODE] first: this has nothing to do with the crashes, but it isn't recommended to use the system command (look [URL="http://www.gidnetwork.com/b-61.html"]here[/URL], this info does also apply to the "CLS" command) As Narue said it's probably an override or out-of-bound error …

Member Avatar for binamy1
0
140
Member Avatar for snoopy198520
Member Avatar for snoopy198520
0
129
Member Avatar for deedub

What about something like this ? [CODE=C++] #include <iostream> using namespace std; int main() { char chr; while(cin.peek() != '|') { cin.get(chr); cin.ignore(1000, '\n'); /* Put your code here */ } return 0; } [/CODE]

Member Avatar for tux4life
0
2K
Member Avatar for Clockowl

[QUOTE=Clockowl;851617] How would I merge these two functions? They have so much it common! It seemed redundant... Is there a way with templates and/or with a function that has the shared code? [/QUOTE] Templates could be an option I think, but isn't overloading a good one ?

Member Avatar for ArkM
0
92
Member Avatar for DREAMER546

[QUOTE=niek_e;852073]If this is homework, then tell us what do [I]you[/I] think the output will be and I might test it. [edit] on second look: I already spot one problem: 'i' is not declared, so it won't even compile[/QUOTE] Absolutely right :) Edit:: Avoid using [ICODE]exit(0);[/ICODE] in this case you're better …

Member Avatar for Nick Evan
0
149
Member Avatar for elbashamoe

[QUOTE=elbashamoe;851488]need help with everything dont realy know where i should start[/QUOTE] Split the problem down in several parts which are each easy to understand (this process is also known as abstraction), create a plan before you actually go onto the coding part ...

Member Avatar for tux4life
0
105
Member Avatar for sunshyne23
Re: help

Sure we can help you, post your code, ask questions about what you don't understand and we'll help you out, but remember one thing: we aren't doing any homework for you :), we're just helping you to understand things, in that way you'll become a much better programmer than just …

Member Avatar for ithelp
0
84
Member Avatar for harrykokil

Was there something more difficult ? Davidhoria and Narue are right :) By the way, did you try [URL="http://www.google.com/search?q=c%2B%2B+face+recognition&meta=&aq=0&oq=c%2B%2B+face+re"]searching Google[/URL] ?

Member Avatar for ithelp
0
111
Member Avatar for southernd0529

Please post using code tags, by the way: what's your problem as you didn't tell me :) ...

Member Avatar for jephthah
0
350
Member Avatar for booker

[QUOTE=Sky Diploma;851485][code] #include <..//Folder_Name//File.h> [/code] I think this should work out. You need to traverse to the previous directory and then to a sub-directory.[/QUOTE] Using '<' and '>' works only if the header files are in the compiler's header files directory ... [QUOTE=ArkM;851489]Probably the simplest way to go: [code=c++] #include …

Member Avatar for booker
0
99
Member Avatar for Nickair

[QUOTE=siddhant3s;849942] I would suggest to get a book rather than relying on tutorials. [/QUOTE] Yeah, I would also do so, books are often much better to learn a programming language, but that's just my personal opinion ... Further I can recommend you 'C++ Black Book' (by Steven Holzner) and 'C++ …

Member Avatar for tux4life
0
104
Member Avatar for viki0077
Member Avatar for tux4life
0
8K
Member Avatar for jomacho

It's just compiling fine with me (it gives a lot of warnings), I'm using the Borland Compiler ... Edit:: Using the Microsoft C++ compiler (from Visual C++ 2008 Express Edition) I'm also getting this error ...

Member Avatar for tux4life
0
127
Member Avatar for Stefano Mtangoo

I think there are written lots of books about QT ... Linux desktop environment KDE is also QT-powered ... But personally I think wxWidgets is easier to learn, actually you should just try both of them, and stay with the one you feel yourself most comfortable with :) ...

Member Avatar for NicAx64
0
440
Member Avatar for pratapchiluveru

I think Microsoft backup is able to do that, but it will be a more pleasant experience if you just use [URL="http://www.acronis.com/"]Acronis TrueImage[/URL] which is designed for that purpose ...

Member Avatar for jbennet
0
189
Member Avatar for smitem03

Please post using code tags, can you also please tell me what problem you're having ?

Member Avatar for jephthah
0
104
Member Avatar for fearsneachta
Member Avatar for fearsneachta
0
113
Member Avatar for ihatehumans

[QUOTE=ihatehumans;849187]As part of an assignment I am creating a class to handle rationals with numerators and denominators, overloading the operators for cin and cout, [U][B]as well as +-*/[/B][/U]. So these are the functions for those operators, now where exactly should I include these in my class? [code] Rational addition(Rational a, …

Member Avatar for siddhant3s
0
205
Member Avatar for ShadowScripter

Why are you using old casting ? [QUOTE=ShadowScripter;848444] [CODE] double test2_calc = [B](double)[/B]10/[B](double)[/B]5; const int test2 = [B](int)[/B]test2_calc; [/CODE] [/QUOTE] It's a better practice to use the new casting operators to do conversion between datatypes: [CODE] double num = 5.23; int num2 = [B]static_cast<int>([/B]num[B])[/B]; [/CODE] instead of the old ones: …

Member Avatar for ShadowScripter
0
710
Member Avatar for orwa

[QUOTE=Narue;94028]Why? This is a suspicious activity, so we need a good reason before helping you with it.[/QUOTE] Yeah, that's indeed a suspicious activity ... [QUOTE=Bladtman242;849280]Why does it need to be before logon?[/QUOTE] Good question, it's much easier to implement if it's after the logon process :) ...

Member Avatar for MosaicFuneral
0
184
Member Avatar for yazooney

[QUOTE=yazooney;664349] What I want to know is how do I set up and use a proxy to intercept the data files sent and then transfer the data to a file so it can be read?[/QUOTE] Intercepting data, that's actually the base of a firewall :) ... Edit:: The following post …

Member Avatar for jen140
0
907
Member Avatar for genieuk

Why don't you try it yourself first ? > Get the input (the age) from the user > Use some conditional statements ( [ICODE]if(condition) { /... }[/ICODE] ) to check whether the script has to grant access or not > Now you only need a command which redirects the user …

Member Avatar for genieuk
0
265
Member Avatar for Usura

I don't think it's possible in your way, you should declare an array of pointers instead if you want to delete individual elements ...

Member Avatar for tux4life
0
81
Member Avatar for kootech

It's always nice if you can solve your problems yourself, congratz :) ... (It was indeed a beginners mistake, but never mind it can overcome anyone)

Member Avatar for kootech
0
156
Member Avatar for kiwihaha

[QUOTE=kiwihaha;849347] [CODE] struct AXEMAN axeman; struct DEFENDER defender; struct ARCHER archer; struct ROUGE rouge; struct SPEARMAN spearman; [/CODE] [/QUOTE] In C++ you don't have to supply the 'struct' word each time before you declare a struct-variable, though it's still allowed to do so, you can save some typing :) ... …

Member Avatar for tux4life
0
174
Member Avatar for mostafanageeb

Yup, first read the forum rules and by the way people here usually don't respond to questions like: 'Please I want someone to help me' You need to show us what you've done so far (forum rules), it's a nice assignment and it isn't too difficult, so give it a …

Member Avatar for tux4life
-1
98
Member Avatar for SmokyMo

Yup, fstream's open-method only accepts a c-string as it's argument for the filename, so you'll have to convert your C++ string to a c-string first, you can easily do this by using the [ICODE]c_str()[/ICODE] method of the string class :) ...

Member Avatar for tux4life
0
90
Member Avatar for bkeenom

The following code should work: [CODE=C++] void trim(string & s) { int strlen = s.length(); string tmp; for(int i = 0; i < strlen; i++) if(s[i] != ' ') tmp += s[i]; s = tmp; } [/CODE] > Why are you using a seperate counter 'k', you can just add …

Member Avatar for bkeenom
0
81
Member Avatar for albert1234

[U][I]FILENAME[/I].BAT[/U] [CODE] @ECHO OFF fsutil.exe fsinfo statistics c: [/CODE] Save this under [I]filename[/I].bat and it will run the requested command :) ... Edit:: Replace [I]filename[/I] with an appropriate filename ...

Member Avatar for albert1234
0
83
Member Avatar for 123qwerty123

[QUOTE=r.stiltskin;848912]Did you read this: [url]http://www.daniweb.com/forums/announcement8-3.html[/url][/QUOTE] Apparently he didn't :P ... You could use the 'list'-container from STL if you want linked lists ... (Look [URL="http://www.cprogramming.com/tutorial/stl/stllist.html"]here[/URL] or [URL="http://www.cplusplus.com/reference/stl/list/sort/"]here[/URL]) Or are you supposed to do without ?

Member Avatar for tux4life
0
965
Member Avatar for kelechi96

There's nothing wrong with using the goto-statement, but overwhelming use of it makes your code very difficult to understand and extremely hard to debug, so my advice is: avoid it as much as you can and use it only when there's no other possibility left :) ...

Member Avatar for kelechi96
0
170
Member Avatar for vsha041

What about the following ones ? > [URL="http://mattmccutchen.net/bigint/"]http://mattmccutchen.net/bigint/[/URL] > [URL="http://sourceforge.net/projects/cpp-bigint/"]http://sourceforge.net/projects/cpp-bigint/[/URL] Edit:: If you're using one of these libraries it's easy to write your own modPow() function :) ...

Member Avatar for tux4life
0
135
Member Avatar for amitonvoip

[QUOTE=dmytro;848389]Try this library - [url]http://www.libxl.com[/url][/QUOTE] Yeah, but it isn't a free one, try searching [URL="http://www.wotsit.org/"]wotsit.org[/URL] instead ... Maybe the following link is also useful for you: [URL="http://chicago.sourceforge.net/"]http://chicago.sourceforge.net/[/URL]

Member Avatar for marco93
0
175
Member Avatar for BunnysMom

Can you post the code which is causing the error (using code tags :P), as the code you posted is compiling with me ...

Member Avatar for siddhant3s
0
101
Member Avatar for starter

Hmm, to use of the [ICODE]getline[/ICODE] function makes me think about the following thread: [URL="http://www.daniweb.com/forums/thread90228.html"]http://www.daniweb.com/forums/thread90228.html[/URL]

Member Avatar for tux4life
0
97
Member Avatar for thornside

[QUOTE=nucleon;848436]Replace [icode]in.ignore();[/icode] with [icode]continue;[/icode] to "ignore" the current character in n.[/QUOTE] That's definitely the way to go !! :)

Member Avatar for tux4life
0
114
Member Avatar for Clockowl

Just image recognizing only won't solve the Mahjongg game, as the program also has to respect the rules of the game, but I assume this isn't the problem ...

Member Avatar for tux4life
0
185
Member Avatar for FREEZX

I think the following algorithm is a better one: If you know the starting number of the interval: -> Check whether the sum of it's digits are even (you could use the modulo operator for this) -> If the sum was even, you automatically know the next number's sum of …

Member Avatar for tux4life
0
1K
Member Avatar for jackalope686

[URL="http://www.cplusplus.com/doc/tutorial/basic_io.html"]This[/URL] will show you how to do some basic interaction with the user ... And [URL="http://www.codersource.net/cpp_tutorial_class.html"]this[/URL] information about C++ classes might also be helpful ... Hope this helps !

Member Avatar for jackalope686
1
402
Member Avatar for jazzezselvan

On line 98 I'm also getting an error when I'm compiling this: [CODE] Error E2141 testt.cpp 98: Declaration syntax error [/CODE]

Member Avatar for jazzezselvan
0
114
Member Avatar for justinmyoung

To display a form from within a PHP script you can do the following: > Use the echo-command to write the HTML-code (which is displaying the form) directly to the webpage > You put the HTML code to view a form outside the PHP-tag(s) You could also check out [URL="http://www.tizag.com/phpT/examples/formex.php"]this[/URL] …

Member Avatar for rm_daniweb
0
3K

The End.