921 Posted Topics

Member Avatar for oling

Your way off :) First of all you can't access a variable outside of its own scope, you are using the variable [B]i[/B] in the function [B]mystrlen[/B], though it was created in the [B]main[/B] function. If you want to make the function [B]mystrlen[/B] return the length of [B]ptr[/B], simply loop …

Member Avatar for oling
0
105
Member Avatar for Smed

Now that i've had a better look at what you've got sofar, a way I think you could go about fixing this problem is by using the [B]WM_ERASEBKGND[/B] message. By doing that all the notepad windows will be painted perfectly. However, you are going to have to manually paint [B]only[/B] …

Member Avatar for rdjusr
0
176
Member Avatar for The Dude
Member Avatar for SQ89

After 10 posts, have you still not figured out that your supposed to use [URL="http://www.daniweb.com/forums/thread93280.html"]code tags[/URL] here?..

Member Avatar for ddanbe
0
161
Member Avatar for BRICEK

Start by making a program that will at least compile, anything is better than nothing.[CODE=CPLUSPLUS]#include <iostream> int main() { return 0; }[/CODE]Now, heres an example of how to convert a single variable to MPH using the formula given.[CODE=CPLUSPLUS]#include <iostream> int main() { double KPH = 50; double MPH = KPH …

Member Avatar for William Hemsworth
0
84
Member Avatar for cherryteresa

First of all, don't use [B]void main[/B], theres just no need, and main always returns [B]int[/B]. If I understood correctly, I think your teacher wants you to make a simple loop to display the characters 10-12, without cycling through the rest.[CODE]#include <iostream> using namespace std; [COLOR="Red"]int main[/COLOR]() { char test[15] …

Member Avatar for cherryteresa
0
140
Member Avatar for sneekula

Careful with [B][url]http://www.penisland.net/[/url][/B], change it to [B].com[/B], and you've got yourself a problem ;o

Member Avatar for sneekula
0
103
Member Avatar for The Dude
Member Avatar for dickersonka
Member Avatar for jbennet
0
119
Member Avatar for nuubee
Member Avatar for yunghove
Member Avatar for bonnie1702
0
113
Member Avatar for asifjavaid

Haven't done .NET in a hell of a long time, but doesn't it go something like this? [CODE][DllImport("[COLOR="Red"]DLLNAME[/COLOR].dll")] static extern void [COLOR="Red"]FUNCTION_NAME[/COLOR]([COLOR="Red"]PARAMS[/COLOR]);[/CODE] May not be right, but I hope this helps.

Member Avatar for William Hemsworth
0
90
Member Avatar for Djanvk

Perhaps read the text from the text box into a string, and use [URL="http://www.cplusplus.com/reference/iostream/stringstream/"]std::stringstream[/URL] to break it up.

Member Avatar for Djanvk
0
116
Member Avatar for blackhawk9876

Perhaps if you had read the rules and used code tags, I would be a little more encouraged to help.. [B][URL="http://www.daniweb.com/forums/thread78223.html"]Read This Before Posting[/URL][/B]

Member Avatar for William Hemsworth
0
138
Member Avatar for ZZucker

[QUOTE]I always wanted to know this; Where does space end, and if it does not end, where does it go?[/QUOTE] You can't think of space having an end. Imagine people haden't discovered that the earth was round, and somebody decided to go for a VERY long walk.. and eventually finds …

Member Avatar for Lardmeister
0
1K
Member Avatar for kalou

If you have to write your own square root function, I would recommend the [B][URL="http://en.wikipedia.org/wiki/Babylonian_method#Babylonian_method"]Babylonian method[/URL][/B].

Member Avatar for William Hemsworth
0
87
Member Avatar for liquoriser21

Well, considering that im 15 years old and have been coding since about the age of 12, don't have a job and am free to do pretty much anything I want :D I code when I have nothing else to do (or feel like it), so I woulden't say it …

Member Avatar for vegaseat
0
239
Member Avatar for f.ben.isaac

I managed to make the code compile free of errors and warnings, here are the changes I made.[CODE]#include<iostream> #include<string> #include<sstream> #include<winsock2.h> [COLOR="Red"][B]#include<ws2tcpip.h>[/B][/COLOR] [COLOR="Red"][B]#pragma comment(lib, "Ws2_32.lib")[/B][/COLOR] using namespace std; struct addrinfo hints; //fill your host info - hints is input struct addrinfo *results; //gets your host info - results is output …

Member Avatar for f.ben.isaac
1
497
Member Avatar for itdupuis

[URL="http://www.universetoday.com/2008/09/20/helium-leak-forces-lhc-shutdown-for-at-least-two-months/"]http://www.universetoday.com/2008/09/20/helium-leak-forces-lhc-shutdown-for-at-least-two-months/[/URL]

Member Avatar for itdupuis
0
486
Member Avatar for Smed

This to me seemed like quite an interesting idea, so I had a go at it. The only real problem I had is painting problems (which can probably quite easily be sorted out). This sample program will assume that [B]notepad.exe[/B] is already open before this program is executed. It then …

Member Avatar for William Hemsworth
0
204
Member Avatar for chococrack

[QUOTE]i think you should try including iostream too. [/QUOTE]No need, theres no references to anything in [B]iostream[/B] yet.

Member Avatar for Alex Edwards
0
188
Member Avatar for wussa

On line 47, you try to use the member [B]BasicHandphone::smsStatus[/B], which you commented out.. so by uncommenting it, you remove that error. You also fergot to add the prototype for the [B]operator>>[/B] function, so change you class like this.[CODE]class BasicHandphone { private: int f; [COLOR="Green"]int smsStatus[/COLOR][10][COLOR="Red"];[/COLOR] int inboxCount; string sms[10]; …

Member Avatar for William Hemsworth
0
70
Member Avatar for concavang

This worked great for me.. [URL="http://69.10.233.10/KB/architecture/lint.aspx"]http://69.10.233.10/KB/architecture/lint.aspx[/URL] Otherwise, your going to have to be abit more specific on what you want here.

Member Avatar for Salem
0
264
Member Avatar for elizabeth.h1

Can you post some code where you are using the [B]_tcscat_s[/B] function?

Member Avatar for Salem
0
256
Member Avatar for sharareh26zaman

Code this small can easily be embedded into your post, so in future, do it :icon_wink: [CODE=CPLUSPLUS]#define _AFXDLL #include <fstream> #include <string> #include <Cstringt.h> #include <iostream> #include <direct.h> #include <afxv_w32.h> using namespace std; int main() { string line1, line2 ; string end_str ; CFileFind finder; bool finding = finder.FindFile (); …

Member Avatar for Salem
0
120
Member Avatar for alin_yuhee

[QUOTE]you are right ....i'm still in the process to understand c++.....i want to make a game that involve throwing or launching of an object but it must have at least one obstacle partially obstructing the throwing path (for example: a high wall) and at least one other difficulty for the …

Member Avatar for William Hemsworth
0
124
Member Avatar for abelingaw

You have given no details at all, you didn't even ask a question or describe a problem :icon_confused: , exactly what do you need help with?

Member Avatar for rati
0
173
Member Avatar for Aamp88

My recommendation for you.. [URL="http://www.google.co.uk/search?hl=en&q=C%2B%2B+tutorial&btnG=Search&meta="]http://www.google.co.uk/search?hl=en&q=C%2B%2B+tutorial&btnG=Search&meta=[/URL]

Member Avatar for William Hemsworth
0
141
Member Avatar for kudusan

I made a game in Win32 but it was quite difficult. It is called the 'SameGame' or commonly known as bubblebreaker mainly for phones, It might just give you an idea of how difficult it is to make these kind of games using Win32.

Member Avatar for Salem
0
306
Member Avatar for terme22
Member Avatar for Talli

>make a simple program If its so simple, why can't you do it?, or at least make an attempt at it. All you need to know to be able to do this, is how to use [URL="http://mathbits.com/mathbits/compsci/looping/nested.htm"]nested loops[/URL] and from there i'm sure you could figure it out yourself.

Member Avatar for Talli
0
131
Member Avatar for san_sarangkar
Member Avatar for Nemoticchigga

Your going to have to be much more specific on your problem ;) Post more details or code if possible.

Member Avatar for TheBeast32
0
96
Member Avatar for VernonDozier

[QUOTE]for (c = 0; c <= 5; c++) that counts from 0 to 6, not 0 to 5.[/QUOTE] Depends, if you write it like this, it displays [B]"012345"[/B], but [B]c[/B] has the value [B]6[/B] once its out the loop.[CODE=CPLUSPLUS]#include <iostream> using namespace std; int main() { int c; for (c …

Member Avatar for VernonDozier
1
162
Member Avatar for teh noobshow

I've had enough of people like you trying to cheat on or hack runescape, its totally pathetic. And you do know its illegal what your doing right? Look at 4th rule. [URL="http://www.runescape.com/kbase/viewarticle.ws?article_id=2077#what"]link[/URL] And I dont care if your 13, its no excuse to do this sort of thing, Its time …

Member Avatar for William Hemsworth
-2
366
Member Avatar for Stefano Mtangoo

Heres a nice tutorial to start. [URL="http://www.cprogramming.com/tutorial/lesson1.html"]http://www.cprogramming.com/tutorial/lesson1.html[/URL]

Member Avatar for William Hemsworth
0
123
Member Avatar for The Dude
Member Avatar for kenji

Well, a simple way to achieve this would be to create another array, the same length as [B]arr[/B], go through each character, and if that character isn't a space then copy it to the second array. Like this.[CODE=CPLUSPLUS]#include <iostream> int main() { char arr[] = "abc def"; // Create another …

Member Avatar for kenji
0
9K
Member Avatar for geemicah

Why didn't you just post the code?.. [CODE=CPLUSPLUS]#include<stdio.h> #include<conio.h> #include<math.h> float compute_amount(int kilowatt); float compute_tax(float total); void main() {clrscr(); int kilowatt; float Amount; char decide; do{ printf("Please enter your kilowatt: "); scanf("%d",&kilowatt); Amount=compute_amount(kilowatt); printf("Your current Bill for this month is: %f\n\n",Amount); printf("Do you want to repeat your transaction[Y or N]: …

Member Avatar for geemicah
0
98
Member Avatar for cwilliam912
Re: C++

Well.. whats your problem? And, learn how to use [URL="http://www.daniweb.com/forums/announcement8-3.html"]code-tags[/URL].

Member Avatar for twomers
0
245
Member Avatar for atreides27

Heres a nice place to start... [URL="http://www.cplusplus.com/doc/tutorial/"]http://www.cplusplus.com/doc/tutorial/[/URL]

Member Avatar for William Hemsworth
0
111
Member Avatar for nichokongo
Member Avatar for Jennifer84

You test may not be entirely accurate, for example in this part of the code:[CODE]for (int i = 0; i < 2000000; i++) { [COLOR="Red"]stringstream v1(Num);[/COLOR] v1 >> Number1; }[/CODE] Because here you are constructing [B]stringstream[/B] 2000000 times, and destroying it 2000000 times, which obviously is going to add to …

Member Avatar for mitrmkar
0
154
Member Avatar for Technotronix

I'm not going to encourage cheating, and im certainly not going to give away code, this isn't the sort of thing that can be done in one night, you need to know some advanced C++ stuff, which im guessing you don't know. The only way this is going to get …

Member Avatar for Nick Evan
0
102
Member Avatar for jrrr

[URL="http://www.catb.org/~esr/faqs/smart-questions.html#bespecific"]http://www.catb.org/~esr/faqs/smart-questions.html#bespecific[/URL] [URL="http://www.daniweb.com/forums/announcement8-3.html"]http://www.daniweb.com/forums/announcement8-3.html[/URL]

Member Avatar for mitrmkar
0
94
Member Avatar for jrrr

>Can you complete my code? No, why should I? We will help, but we won't do it for you, so unless you have a specific problem, im not doing a thing.

Member Avatar for stilllearning
0
88
Member Avatar for The Dude
Member Avatar for The Dude
Member Avatar for jadedman

GIYF! [URL="http://www.google.co.uk/search?hl=en&q=C%2B%2B+cout+stream&btnG=Search&meta="]http://www.google.co.uk/search?hl=en&q=C%2B%2B+cout+stream&btnG=Search&meta=[/URL]

Member Avatar for x3mario
0
143
Member Avatar for AlPhA

You do realise that this is a 6 year old thread, and [B]ALPha[/B] hasn't had any acivity on this forum for about 2 years ?.. ;)

Member Avatar for efmesch
0
499

The End.