1,171 Posted Topics

Member Avatar for drjay1627

Maybe you should post another source, which also isn't compiling under Solaris, but which you aren't using in your project ...

Member Avatar for drjay1627
0
81
Member Avatar for everard

[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 …

Member Avatar for tux4life
0
100
Member Avatar for beatlea

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 ...

Member Avatar for beatlea
0
119
Member Avatar for zqlpzq
Member Avatar for NorCal

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 ...

Member Avatar for tux4life
0
125
Member Avatar for mimis

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]

Member Avatar for tux4life
0
251
Member Avatar for The Dude

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 !!!;)

Member Avatar for Godsp3ed
0
236
Member Avatar for eforry

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 …

Member Avatar for smart7
0
117
Member Avatar for SeeJay023

You should maybe consider doing an online virus scan ... Try [URL="http://www.eset.com/onlinescan/"]Eset[/URL] !

Member Avatar for Godsp3ed
0
70
Member Avatar for prokorn

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 …

Member Avatar for Godsp3ed
0
127
Member Avatar for handyman2

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 …

Member Avatar for jbennet
0
106
Member Avatar for Mostafa Adel

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 …

Member Avatar for MosaicFuneral
0
214
Member Avatar for 55dodge

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) …

Member Avatar for 55dodge
0
82
Member Avatar for free radical

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 ...*/ …

Member Avatar for free radical
0
191
Member Avatar for Bimmerdan

If you can live with an alternative Office Suite, you could use OpenOffice instead, it's very good (and free:) ) !

Member Avatar for Bimmerdan
0
150
Member Avatar for I-R

[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 …

Member Avatar for tux4life
0
123
Member Avatar for Ed Davis
Member Avatar for tux4life
0
156
Member Avatar for tux4life

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 …

Member Avatar for tux4life
0
231
Member Avatar for alias120
Member Avatar for tux4life
0
98
Member Avatar for Bob Gempaloran

Or the free: > Spybot search and Destroy (from safer networks) !! > Ad-aware Free (from lavasoft) !

Member Avatar for tux4life
0
52
Member Avatar for alexak

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. ...)

Member Avatar for tux4life
0
186
Member Avatar for opposition

> 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 …

Member Avatar for daviddoria
0
172
Member Avatar for OffbeatPatriot

[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 ...

Member Avatar for MrSpigot
0
99
Member Avatar for lehe

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 …

Member Avatar for tux4life
0
88
Member Avatar for drjay1627

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 …

Member Avatar for tux4life
0
104
Member Avatar for sgw

[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 …

Member Avatar for ArkM
0
23K
Member Avatar for zaohin

Yeah, it's truly right what Ancient Dragon said, but keep on searching ... Sure you can solve it !

Member Avatar for ithelp
0
104
Member Avatar for massivefermion

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 …

Member Avatar for ithelp
0
147
Member Avatar for bluebird

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 ...

Member Avatar for tux4life
0
109
Member Avatar for daviddoria

[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 ...

Member Avatar for tux4life
0
294
Member Avatar for ahvicm

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 = …

Member Avatar for tux4life
0
88
Member Avatar for evbaseball6

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, …

Member Avatar for tux4life
0
73
Member Avatar for JameB

[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 …

Member Avatar for nucleon
0
151
Member Avatar for tux4life

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 …

Member Avatar for jbennet
0
267
Member Avatar for gaspan

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){ …

Member Avatar for tux4life
0
129
Member Avatar for perumar

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; /******************** …

Member Avatar for tux4life
0
723
Member Avatar for badboizEnt

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) …

Member Avatar for badboizEnt
0
223
Member Avatar for perumar

> 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 …

Member Avatar for tux4life
0
262
Member Avatar for massivefermion

[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, …

Member Avatar for Narue
0
144
Member Avatar for bluebird

Yeah, do something like siddhant: put [iCODE]cin.ignore();[/iCODE] after [iCODE]cin.getline(name,20); [/iCODE] it works !! (credit goes to siddhant)

Member Avatar for tux4life
0
99
Member Avatar for abby2589

[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 !!

Member Avatar for tux4life
-2
152
Member Avatar for aidy

[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]

Member Avatar for tux4life
0
85
Member Avatar for cloud21

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 ...

Member Avatar for VernonDozier
0
209
Member Avatar for winrawr

> 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 …

Member Avatar for monkey_king
0
138
Member Avatar for dubster

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 …

Member Avatar for tux4life
0
106
Member Avatar for erialclaire_238

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 …

Member Avatar for erialclaire_238
0
319
Member Avatar for trinity_neo

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); …

Member Avatar for siddhant3s
0
174
Member Avatar for winrawr

Didn't know this but in C++ you can use pointers or references to achieve the same as you did ...

Member Avatar for winrawr
0
107
Member Avatar for snap!

Please do at least some effort to write some code ... And when you're really stuck we'll help you ...

Member Avatar for StuXYZ
0
92
Member Avatar for ace_dman

[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 …

Member Avatar for ace_dman
0
103

The End.