1,171 Posted Topics
Re: Maybe you should post another source, which also isn't compiling under Solaris, but which you aren't using in your project ... | |
Re: [QUOTE=everard;838480]I'm just using CString variables wherein it holds the data. How can I clear the value of a variable? I'm just using = ""; (ex. translated = ""; ). Is it enough to clear the memory?[/QUOTE] It's only clearing the value of a variable, it's not releasing the assigned memory … | |
Re: Yeah, I also agree with MrSpigot, you should consider to use an alternative design for your program as it will be really difficult and error-prone to do what you're asking for ... | |
Re: Do they all have the same subnetmasker (usually '255.255.255.0') ? | |
Re: Normally you cannot use DELL Recovery CD's on other computer systems than DELL systems, as DELL verifies it (something with an OEM-BIOS) ... But normally you can buy a new recovery cd from HP ... | |
Re: Please check out the following C++ libraries: > [URL="http://mattmccutchen.net/bigint/"]http://mattmccutchen.net/bigint/[/URL] > [URL="http://sourceforge.net/projects/cpp-bigint/"]http://sourceforge.net/projects/cpp-bigint/[/URL] | |
Re: I'm always using the following programs to speed up my pc: > SmartDefrag > CCleaner > TuneXP > RegSeeker And the best of it is: they're all free !!!;) | |
Re: Yeah, we aren't writing programs for you, you first have to show some effort, post the code you already have ... And if you don't know where to start then do the following: break the problem down into little parts which are simple to solve, then you put everything together … | |
Re: You should maybe consider doing an online virus scan ... Try [URL="http://www.eset.com/onlinescan/"]Eset[/URL] ! | |
Re: Agreed with 'Norton is bulk', but the 2009 version is still a great improvement over the previous versions, but I would recommend using another AV, AVG is a good one, but AVIRA AntiVir is currently getting high marks from AV-Comparatives and it's also free, it's only a matter of choice … | |
Re: What's your computer vendor? Did Windows came pre-installed with your pc, in that case it came probably also with a recovery cd or a recovery partition (somewhere on your harddisk) ... Consider looking it ('it' means 'how you have to restore your pc to the state in which it was … | |
Re: I'm always using the following code if I want to use a 2D Dynamic char array: [CODE=cplusplus] #include <iostream> using namespace std; int main(void) { /* Declare the '2D Array' */ char ** ptr = new char * [5]; ptr[0] = new char[20]; ptr[1] = new char[20]; ptr[2] = new … | |
Re: I would go for an external Network Hard disk or a NAS (which is directly connected to the router via Ethernet) ... As backup software you have a lot of choice ... Two free and very good backup programs are SyncBack and Cobian Backup (just use Google to find them) … | |
Re: Maybe the following code will help you: [CODE=cplusplus] #include <iostream> using namespace std; int main(void) { char answer; cout << "Do you want to run this program ? [Y][N] "; cin >> answer; if(answer == 'y' || answer == 'Y') { /* ... There has to be nothing here ...*/ … | |
Re: If you can live with an alternative Office Suite, you could use OpenOffice instead, it's very good (and free:) ) ! | |
Re: [QUOTE=I-R;835401]hello ppl im new to C++ i was making a small newbie math quiz.. and was wandering how can i make it that at the end it says how much u got out of 10 or watever [/QUOTE] Make use of a variable 'points' for instance and increase it by … | |
Re: Can you boot into safe mode ? (Press F8 just before Windows starts to load) | |
Can someone please take a look at my code to ensure there aren't any memory leaks or (array) overrides or anything else which could be a bad practice in my code ... Here's my code: [CODE=C++] #include <iostream> using namespace std; template <typename T> void create2DMatrix(int rows, int cols, T … | |
Re: Maybe you should buy a book from Microsoft Press about that topic ... | |
Re: Or the free: > Spybot search and Destroy (from safer networks) !! > Ad-aware Free (from lavasoft) ! | |
Re: I took the following from the website: [ICODE]QuotePad saves the text selected on the screen without forgetting its source.[/ICODE] It could be very useful !!! We appreciate you share your knowledge, I believe some people really need an app like that one (you know for school, work etc. ...) | |
Re: > You could maybe try creating pointers in the public section of your class and point them to the private data you want to share ... But you should definitely learn how to use a 'friend', it's a much better way to do this ... > You could also create … | |
Re: [QUOTE=MrSpigot;834355] So remember that any memory you allocate with "new" must be freed with "delete" and you need to care of that. It won't happen automatically.[/QUOTE] Unless you're using the <auto_ptr> template, in that case the reserved memory will automatically be freed when the pointer goes out of scope ... | |
Re: C++ doesn't provide built-in support for multithreading, the reason for that is you have to use the operating system's features to write a multithreaded application (as it's the most efficient way) ... But as Ancient Dragon did already say: The Operating System has to distribute the threads among all the … | |
Re: If copy protection also falls under 'plagiarism detection' then you could do the following: -> Check the MAC-address of the computer and compare it with a list of MAC-addresses in an online database ... (This is already a very good protection ...) If plagiarism detection only: -> You could maybe … | |
Re: [iCODE]time(0);[/iCODE] or [iCODE]time(NULL);[/iCODE] returns the system time in seconds ... The C++ Declaration of the 'time()'-function looks as follows: [iCODE]time_t time ( time_t * timer );[/iCODE] So if you pass a NULL-pointer as argument, it will just return the time ... But between the brackets you can also type the … | |
Re: Yeah, it's truly right what Ancient Dragon said, but keep on searching ... Sure you can solve it ! | |
Re: You can maybe write a program to estimate the square root of a given number, or you could write a function 'stod' which converts a string to a double ... Or a function which checks whether a string can be turned into a number or not ... Or ... you … | |
Re: I think you're having trouble with this code because you're using [iCODE]cin.ignore()[/iCODE] somewhere in your code, I can't figure out anything else which is wrong ... | |
Re: [iCODE].TXX: DataPerfect Text Storage[/iCODE] (A file format to store ASCII-only characters) Are your sure it was '.TXX' and not '.CXX'? '.CXX' is a valid C++ extension ... | |
![]() | Re: I've changed the code from the link Ancient Dragon posted, it's still not complete, but it's more useful ... [CODE=cplusplus] #include<iostream> #include<string> #include<conio.h> using namespace std; int main() { string userinput; char cchar; int cint; cout << "Enter password: "; for(int i=0; ; i++ ){ cchar = getch(); cint = … |
Re: I wrote an example program which demonstrates some techniques you can use: [CODE=cplusplus] #include <iostream> using namespace std; void showArray(const int array[], int size); void walkArray(const int array[], int el); int main() { const short SIZE = 10; int array[SIZE] = {25, 30, 35, -40, -45, 65, -95, 85, -50, … | |
Re: [QUOTE=nucleon;830080]It's ridiculous[/QUOTE] [QUOTE=kenji;830078]That's just so weird[/QUOTE] You're absolutely right !! [QUOTE=djextreme5;830056] 185 characters. :P[/QUOTE] Actually there are 186 characters ... I used the following program to count it (sure it can be written in a shorter way ;)) [CODE=cplusplus] #include <iostream> #include <fstream> using namespace std; int main() { char … | |
Hello, first of all I'm not a Unix expert at all (otherwise I wasn't asking this question), but I'm having some trouble starting my X-Server ... When I type the following:[iCODE]startx[/iCODE] or [iCODE]X[/iCODE] I get the following error message(s): [CODE] ... No core pointer Fatal server error: Failed to initialize … | |
Re: I think you should make use of [iCODE]cin.ignore(1000);[/iCODE] or something like that ... For more information read the following thread about it: [URL="http://www.daniweb.com/forums/thread90228.html"]http://www.daniweb.com/forums/thread90228.html[/URL] The error is definitely in the function 'void AddRecord()' ... I posted function where the error resides in: [CODE=cplusplus] void AddRecord(){ int x,y,cmps;char ny,n; cout<<endl; do{ if(record[0][0]!=NULL){ … | |
Re: I've made some changes to your code (there were some logical bugs in your program) I'm not pointing out them in this post, I just want to refer you to your own code and compare it with the (working(?)) code below: [CODE=cplusplus] #include <iostream> #include <cstdlib> using namespace std; /******************** … | |
Re: The following code is a simple example of a for-loop: [CODE=cplusplus] for(int i = 0; i < 3; i++) { /* Your code here */ } [/CODE] This loop repeats the instructions between the [iCODE]'{' '}'[/iCODE] 3 times ... But as Ancient Dragon said, first try searching Google (in future) … | |
Re: > What exactly are you trying to do? > Are you creating a class library? => In this case you'll have to compile it to object code first and after that you can create a library from it ... > Are you writing a stand-alone program? => In this case … | |
Re: [QUOTE=pywriter;827660]Come on man,I considered c++ programmers smarter. its just an example of a pointer.[/QUOTE] They're also smart, but if you aren't giving any detailed information about your problem we can only guess about it ... If you do a quick google search you can find it within exactly 2 seconds, … | |
Re: Yeah, do something like siddhant: put [iCODE]cin.ignore();[/iCODE] after [iCODE]cin.getline(name,20); [/iCODE] it works !! (credit goes to siddhant) | |
Re: [QUOTE=siddhant3s;823935] ... Please Be specific. ... Secondly, DO NOT USE VOID MAIN() [url]http://cppdb.blogspot.com/2009/02/should-i-use-void-main-or-int-main-or.html[/url] use [ICODE]#include<iostream>[/ICODE] and [ICODE]#include<cstdio>[/ICODE] Use a new compiler not a old one ([url]http://cppdb.blogspot.com/2008/10/why-you-shouldnt-use-you-use-old-c.html[/url]) ... [/QUOTE] Totally agreed with that !! | |
Re: [B][U]1)[/U][/B] How are we supposed to help you if you didn't explain your problem? [B][U]2)[/U][/B] [QUOTE=William Hemsworth;825100]Learn how to post. [B][URL="http://www.daniweb.com/forums/thread78223.html"]Link[/URL][/B][/QUOTE] [U][B]AGREED[/B][/U] | |
Re: For such a simple game I wouldn't create a whole class, it's maybe only 30 lines or so ... In my opinion you really get benefit from classes when you've [iCODE]moderate - big[/iCODE] C++ code ... | |
Re: > What editor / compiler are you using? I'm using Code::Blocks (not an editor but an IDE) with the MinGW compiler on Windows 2000 Professional (the best Operating System M$ ever made, has never crashed up until now and works smoothly) For some people who ask themselves why I'm using … | |
Re: Did you mean something like this: [CODE=c] #include <stdio.h> #include <stdlib.h> #define NUM_OF_ELEMENTS 2 void createAlpha(char **&data, int elements); int main() { char ** alpha; createAlpha(alpha, NUM_OF_ELEMENTS); alpha[0] = (char*) 'H'; alpha[1] = (char*) 'e'; fprintf(stdout, "%c%c\n", alpha[0], alpha[1]); free(alpha); return 0; } void createAlpha(char **&data, int elements) { for(int … | |
Re: The following code will do the job: [CODE=cplusplus] #include <iostream> using namespace std; int main(void) { const int MAX_NUMS = 5; int value_array[MAX_NUMS] = {0}; // initialize to zero int value_pos_array[MAX_NUMS] = {0}; // initialize to zero int number_to_find; cout << "Enter " << MAX_NUMS << " values: "; for(int … | |
Re: I wrote two simple C++-functions: -> One wich raises a number x to the power of y ([iCODE]apow(x, y);[/iCODE]) -> One which calculates the faculty of number x ([iCODE]faculty(x);[/iCODE]) [CODE=cplusplus] long long faculty(long x) { long long y = 1; y = 1; for(int i = 1; i < (x+1); … | |
Re: Didn't know this but in C++ you can use pointers or references to achieve the same as you did ... | |
Re: Please do at least some effort to write some code ... And when you're really stuck we'll help you ... | |
Re: [U]Q[/U]: What is a pointer? [U]A[/U]: A pointer 'points' to an address in your computer's memory ... A pointer can not only point to a variable, but also to an object, a struct and much more other types of data ... If you think in the following way: "A variable … |
The End.