1,171 Posted Topics

Member Avatar for mustafaneguib

To the OP: Well, as you have previous knowledge of C++, then you'll have no problems in understanding and applying these before start writing any other program: [url]http://cboard.cprogramming.com/c-programming/88495-development-process.html[/url] . (Please note: you can apply this process to any programming language, that's what it makes so good)

Member Avatar for mustafaneguib
0
166
Member Avatar for DoEds

Why would you want to wrap this [B]if[/B] around the [B]while[/B]: [CODE] if ([COLOR="Green"]k > 1 && m < n[/COLOR]) { while([COLOR="Green"]k > 1 && m < n[/COLOR]) { } } [/CODE] As you can see both conditions are the same, so you can leave out this [B]if[/B] :) Edit:: …

Member Avatar for DoEds
0
100
Member Avatar for karpaklu

[QUOTE=Dream2code;920652]Any one can please say what do we mean by a histogram??[/QUOTE] [URL="http://catb.org/esr/faqs/smart-questions.html#answers"]STFW[/URL]: Look [URL="http://www.lmgtfy.com/?q=histogram"]here[/URL].

Member Avatar for vimalamtwu
0
82
Member Avatar for MrNoob

[QUOTE=MrNoob;920916]well for getchar() coz sometimes i use dev when testing a program its a habbit of me to put return getchar(); rather than writing small thing since its a program made for learning[/QUOTE] Too lazy to just split them up like this? [CODE=C] getchar(); return 0; [/CODE] It's better to …

Member Avatar for MrNoob
0
149
Member Avatar for 9868

Oh no, please not again: [url]http://www.daniweb.com/forums/thread203375.html[/url] ([B]not[/B] a double post)

Member Avatar for Ancient Dragon
0
78
Member Avatar for risa

I guess you should buy a new keyboard, your comma key appears to be broken. >how to deal with it??? Read [URL="http://catb.org/esr/faqs/smart-questions.html"]this[/URL] and fix it.

Member Avatar for Salem
0
490
Member Avatar for new_divine

[QUOTE=new_divine;919575]i'm a bachelor student doinmg b.e in computer and as my project i've decided to make an banking application using wx widget and i'm really frustrated tring to figure it out .Being new to it i need some help[/QUOTE] What OS are you on? What IDE/compiler are you using?

Member Avatar for Stefano Mtangoo
0
334
Member Avatar for pltndragon

It's better to wrap code tags in noparse tags to avoid putting spaces here and there just to make it look like a code tag :P

Member Avatar for pltndragon
0
423
Member Avatar for colmcy1
Member Avatar for tux4life
0
646
Member Avatar for Dream2code

[B]>How to check memory usage by a program by writeing a C program.[/B] A [URL="http://en.wikipedia.org/wiki/Software_performance_analysis"]profiler[/URL] is used for such purposes. [B]>When the program terminates and we didnot free it what happens exactly?[/B] Most OSes (this means: not all!) clean up all the memory assigned to a program when the program …

Member Avatar for Dream2code
0
126
Member Avatar for mrestrepo30

Welcome to this forum, mrestrepo30! Apparently you haven't read how to use code tags, so I'll provide you with a link: [url]http://www.daniweb.com/forums/misc-explaincode.html[/url] (please read this carefully, and in your next post, you apply what's stated in the link) I don't want to blame you for not using code tags (since …

Member Avatar for Dream2code
0
149
Member Avatar for Himani_29

Just a remark on your code, as I see you're using [ICODE]system("ERASE [I]file[/I]");[/ICODE] in your code if you want to erase a file from your harddisk. I can suggest you a better, more portable and more efficient way: [url]http://www.cplusplus.com/reference/clibrary/cstdio/remove/[/url] :)

Member Avatar for tux4life
0
121
Member Avatar for esesili

[QUOTE=esesili;920472]Dear csurfer, I appreciate for your help,it works now. By the way, how can I do it with "call by reference" method? Some friends claim that "call by reference" is better. Do you have any suggestion about "call by reference" ? What is the advantage of "call by reference" ? …

Member Avatar for tux4life
0
120
Member Avatar for esesili

[QUOTE=chaines51;920607]the parameter inside the square brackets when initializing an array represents the LENGTH of an array, not the highest index.[/QUOTE] Well, you can get the upper boundary of the array by subtracting [B]one[/B] from [B]LENGTH[/B].

Member Avatar for tux4life
0
102
Member Avatar for bryangarcia

[QUOTE=lighthead;920069] 1) I thought that 'bryangarcia' did not get the line so, i helped him. It would have be a pity if the thread had dragged on just because the obvious possibility was not explored. 2) I am curious as to know as to how you would have made him …

Member Avatar for csurfer
0
141
Member Avatar for dumrat

[QUOTE=dumrat;917305]Hi, Can someone tell me how to suppress all the warnings g++ produces? Not specific warnings : I know how to do that. I want to not see any warnings at all when I build. Thanks.[/QUOTE] I have to agree with niek_e, since there's really no reason to not want …

Member Avatar for Tom Gunn
0
431
Member Avatar for jjplaw

[B]>I'm quite the newbie in programming...[/B] [B]>Any advice, tips or issues/concerns i should be aware of based on your experience?[/B] So, you told you're newbie, right? In that case I don't believe that this project will succeed.

Member Avatar for tux4life
1
177
Member Avatar for xnoiz

This is not a solution to your question, I only want to show you how your code would look like in more decent C++, so I basically just changed your code. [CODE] #include <iostream> #include <fstream> #include <string> [COLOR="Green"][B]#include <cstdlib>[/B][/COLOR] [COLOR="Red"]// #include <stdlib.h>[/COLOR] using namespace std; [COLOR="Green"][B]const int[/B][/COLOR] MAX_LINES [COLOR="Green"][B]=[/B][/COLOR] …

Member Avatar for tux4life
0
173
Member Avatar for pltndragon
Member Avatar for tux4life
0
2K
Member Avatar for huzeifa

If you're on Windows, you could maybe store the password in the registry. Edit:: BTW, if I remember good, then FileZilla standard stores the passwords in an xml file. (FileZilla is written in C++, so you could maybe get your hands on the freely downloadable source code?)

Member Avatar for tux4life
0
85
Member Avatar for yara naser

[B]>You would be better to do the conversion yourself instead of asking others to do it for you for free.[/B] Yes, 100% agreed :) To the OP: It will only cost you effort. To the OP: One thing you should remember for always and for ever is that: you should …

Member Avatar for necrolin
0
176
Member Avatar for macla

To the OP: in case you're copying the whole thing (look at Sky Diploma's post, code mentioned in the link), then don't forget to change [ICODE]void main()[/ICODE] to [ICODE]int main()[/ICODE] :P And: [CODE] #include <iostream.h> #include <iomanip.h> #include <string.h> [/CODE] to: [CODE] #include <iostream> #include <iomanip> #include <cstring> [/CODE] :P

Member Avatar for tux4life
0
145
Member Avatar for smithss

[QUOTE] An array of 10 int pointers - same as above. [CODE=C++] int(*r[10]); cout << "\nSize of : " << sizeof(r); // 40 bytes [/CODE] [/QUOTE] [U]To the OP:[/U] Please note that if the code looked like: [CODE=C++] double(*r[10]); // <-- change made here cout << "\nSize of : " …

Member Avatar for VernonDozier
1
139
Member Avatar for Himani_29

[QUOTE=Himani_29;918470]yes i mean to say just that.. even i fail to understand as to howcan it happen?[/QUOTE] I really have no idea why this could happen, maybe a memory leak or something? Anyway, could you post down your code, together with the .cap files you were using before you got …

Member Avatar for Himani_29
0
332
Member Avatar for aayush2687

[QUOTE=aayush2687;918371]Salem & japhthah btoh of u guyz r nt here to mprove ma englisg bt to solve r problems ,i don't think so dat u guyz knw d answer of ma question dats y u guys chng d topic to improve English ......LoLz u guyz r really sick n noob …

Member Avatar for tux4life
-1
161
Member Avatar for oopg

Hey [I]oopg[/I], I would like to strongly advise you to learn how to use the [URL="http://www.cplusplus.com/doc/tutorial/files/"]C++ I/O File System[/URL].

Member Avatar for Ancient Dragon
0
279
Member Avatar for ladykaelin

Why would you need to use a pointer for this programming task? I think a recursive function will do fine here. It's only a small range you have to translate, so a recursive function will be the easiest in my opinion :) Also: use arrays to store the numbers (in …

Member Avatar for monkey_king
0
114
Member Avatar for rcbhat

And don't forget to change line 1 of your code to: [ICODE]void swap(char **,char **);[/ICODE] :)

Member Avatar for tuse
0
291
Member Avatar for javaAddict

Did you try: [CODE] #include <cv.h> #include <highgui.h> [/CODE] ? And oh, by the way, have you already read [URL="http://opencv.willowgarage.com/wiki/VisualC%2B%2B"]this[/URL]?

Member Avatar for h.sileem
0
445
Member Avatar for tangent03

Welcome to this forum, tangent03. Could you please check out [URL="http://www.daniweb.com/forums/announcement8-3.html"]this[/URL] page, and add code tags to your future posts? Also, [B]don't use[/B] [ICODE]void main()[/ICODE], it's evil. Instead change it to [ICODE]int main()[/ICODE]. Don't use un-standard libraries such as [B]conio.h[/B], certainly not when you're not using any function from it. …

Member Avatar for Tom Gunn
0
145
Member Avatar for makavelixx

And another addition: all C keywords (and function names from the standard function library) are written in lowercase. As C is case-sensitive, [ICODE][B]Return 0;[/B][/ICODE] isn't valid, and has to be written like [ICODE][B]return 0;[/B][/ICODE] instead. As already told you by [I]tuse[/I], you have to put a [B]return[/B] statement inside a …

Member Avatar for Pavan_
0
278
Member Avatar for shealy

[QUOTE=u8sand;905834]I once tried to do something like this with ONLY C++. Tried to take all the contents of a document and remake it with the same thing. The problem is though that there are some characters that may not show up (may not follow ascii char set) and their may …

Member Avatar for Krushnat
0
549
Member Avatar for rachelwiliam

What I guess is that the name "[B]my code[/B]" is not a very appropriate name for this thread, because the OP probably didn't even write this code himself. But who knows? Only the OP, right? But if he just drops down his code on forum, without any comments, then he's …

Member Avatar for tux4life
0
141
Member Avatar for dumrat

Okay, if you've figured it out, then it's better to mark this thread as solved. But before you do, I want to give my opinion on the use of the following name in your code: [B]I1[/B]. IMO (= In my opinion) you shouldn't use names like this, I only get …

Member Avatar for tux4life
0
118
Member Avatar for vickdini

[B]>but I just haven't found a way to search and replace successfully[/B] Create a new file, write the changed contents to it, and delete the old file.

Member Avatar for Ancient Dragon
0
832
Member Avatar for RJCO

[B]>if anyone have it please send me the link.[/B] I don't have it, but I can give you a link to an online store, where you can legally buy it. You cannot get commercial software legally in their full flavor. (promotional actions are not taken into account here) What you're …

Member Avatar for efmesch
0
108
Member Avatar for AirGear

[QUOTE=AirGear;914967]if we build koolplot with a graph window, then if the graph is closed, the entire code will terminate. can we close the graph without terminate the program?[/QUOTE] Double posting won't help: [url]http://www.daniweb.com/forums/thread203131.html[/url]

Member Avatar for AirGear
0
420
Member Avatar for funjoke88

Well, you want recursion? Then go to this thread and read my post: [url]http://www.daniweb.com/forums/post914703.html#post914703[/url]

Member Avatar for NathanOliver
0
470
Member Avatar for nirav99

[B]>I had already tried with both function "Kbhit()" and "getch()".. but not working...[/B] You did it the wrong way, can you show us the code? BTW, you've already said three times that you've tried it, but how can we believe you? You didn't post your tries. First you should try …

Member Avatar for tux4life
0
157
Member Avatar for Menster
Member Avatar for mediachicken

Well the error is on this line: [ICODE]printf(args);[/ICODE]. [B]printf[/B] is a function inherited from C, and therefore can't handle C++ strings, I would suggest you to use [B]cout[/B] instead: [ICODE]cout << args << endl;[/ICODE]. But you could of course also convert the C++ string to a constant C string, by …

Member Avatar for Ancient Dragon
0
141
Member Avatar for TheSwagger

Well, as everything is in your main function, you could add the following statement at the place where you otherwise would have used the [B]exit()[/B] function: [ICODE]return 0;[/ICODE]. BTW, in your switch: [CODE] case 'X': op="exit"; break; default: return(0); break; [/CODE] Actually the following block of code is not needed …

Member Avatar for TheSwagger
0
65
Member Avatar for poncho4all

Still developing for DOS ? After a small Google search: [url]http://www.ousob.com/ng/turboc/ng4cb17.php[/url]

Member Avatar for poncho4all
0
120
Member Avatar for akulkarni

Well, I know an algorithm: The [U]first step[/U] is concatenating the number one time after itself. This will give us the opportunity to easily find the first part of the possibilities. The [U]second step[/U] is, reverse all the possibilities we've got in the first step, and that will give us …

Member Avatar for JamesCherrill
0
114
Member Avatar for Cloneminds

[QUOTE=Cloneminds;914398]Should I just make it a while statement and forgo the do?[/QUOTE] Well, you could simply do the following: Change: [CODE] total = total + number; [/CODE] To: [CODE] if(number != -1) total = total + number; [/CODE] Edit:: But wouldn't it be better to take [B]0[/B] as value to …

Member Avatar for siddhant3s
0
122
Member Avatar for akulkarni

[QUOTE=akulkarni;914823][code] thanks it worked it was silly on my part i guess [/code][/QUOTE] Please don't write whole posts in code tags, instead use code tags only whenever you need to post a snippet of code. [B]>it was silly on my part i guess[/B] No, it's certainly not silly to ask …

Member Avatar for tux4life
0
293
Member Avatar for lancevo3

For getting the size, you can already use the [B]strlen[/B] function: [CODE] size_t sz; sz = strlen(s); [/CODE] You can use [B]new[][/B] and [B]delete[][/B] for the memory allocation to hold the desired string. After that, you copy the string passed via the argument to the newly allocated memory, use [B]strcpy[/B]. …

Member Avatar for lancevo3
0
337
Member Avatar for theashman88

[QUOTE=Lerner;914407] [code] bool moreInput = true; char temp; while(moreInput) { //get input cout << "enter y to keep going, anything else to stop" << '\n'; cin >> temp; if(temp == 'y') moreInput = false; } [/code] [/QUOTE] I always would write the following line: [ICODE]if(temp == 'y')[/ICODE] as [ICODE]if( [B]tolower(temp)[/B] …

Member Avatar for tux4life
0
247
Member Avatar for Ather14

[QUOTE=Ancient Dragon;914229]If you want the C method [code] char iobuf[255]; long ints[255] = {0}; int i = 0; // get each line of the file while( fgets(iobuf, sizeof(iobuf), fptr) != NULL) { ints[i] = atol(iobuf); } [/code][/QUOTE] Hey AD, where are you increasing [B]i[/B] ? According to that code, all …

Member Avatar for Ancient Dragon
0
977
Member Avatar for AirGear
Member Avatar for AirGear
0
169

The End.