15,300 Posted Topics

Member Avatar for joshmo

[QUOTE=joshmo;622741]if i may say..Actually maybe some people even code nude :)...just saying...it suprised me in this movie where some painter used to do his work bare(and that is how he could only do it) anyways hope its an entertaining idea..[/QUOTE] No way -- not in a roomful of other coders!:icon_eek:

Member Avatar for 0named
0
355
Member Avatar for salman213
Member Avatar for prasu

Look at the [b]Rep Power[/b] you have -- its 0. You can not give green rep until you get it to 1. I think when you make 10 posts your rep power will go up to 1.

Member Avatar for John A
1
93
Member Avatar for ninjaneer

>>when I try to #include afx.h so that I can build threads via AfxBeginThread I get the following error: why are you including afx.h ? If you are using a Microsoft compiler and using precompiled headers then that is already included in stdafx.h >>I was wondering if anyone could tell …

Member Avatar for Ancient Dragon
0
140
Member Avatar for sambafriends

Agree with Ed and Nick -- %p will display the address in hex values, while %u will display it as an unsigned integer. Which one to use really depends only on how you want to view the address. IMO hex is preferable.

Member Avatar for awi123
0
115
Member Avatar for perito

printf() can not be used to display text in a MS-Windows GUI program because there is no console window. Depending on your compiler the simplest way to test it is to compile for debug then set a breakpoint on the printf() line. Another alternative is to create a console window …

Member Avatar for perito
0
115
Member Avatar for Jennifer84

You can not put MessageBox() or AfxMessageBox() inside event handler functions because they behave as you have found -- resursive. Its unfortunate, but that's the way MFC works.

Member Avatar for Radical Edward
0
90
Member Avatar for gargg321

"%d" will produce decimal. If you want hex then use "%x" Try this: [code] int main() { char a[25]; int i; sprintf(a,"%x%x%x",0x0000001F,0x00000001,0x00271418); for(i=0;i<8;i++) { printf("%c\n",a[i]); } return 0; }[/code]

Member Avatar for gargg321
0
288
Member Avatar for moe3ius

WinZip -- which most everyone who does anything worthwhile uses ACD FotoCanvas Lite 2.0 -- open photos and scanned images so that I can convert them to another format CDBurnerXP

Member Avatar for sreein1986
0
192
Member Avatar for mauripelto
Member Avatar for bussumarus

Do the parameters print ok when coded like this ? I am assuming you are NOT compiling for UNICODE because if you were you would be getting other problems. [code] #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { for(int i = 0; i < argc; i++) cout …

Member Avatar for bussumarus
0
85
Member Avatar for champnim

In MS-Windows you will probably want to have two threads -- one thread for dialing and the other thread to do other things. The Sleep(int milliseconds) is available from windows.h

Member Avatar for champnim
0
282
Member Avatar for sambafriends

To get a single character you have to flush the '\n' character from the keyboard buffer. Here is one way to do that [code=c] #include <stdio.h> int main() { int grade; int acount =0; int bcount =0; while((grade=getchar())!=EOF) { switch(grade) { case 'a': ++acount; printf("account = %d\n", acount); getchar(); break; …

Member Avatar for manavsm
0
163
Member Avatar for Lardmeister

Of course that is true -- In the USA they are called senators, congressmen, and lobbyists.

Member Avatar for techbound
1
83
Member Avatar for raul15791

Are you using *nix or MS-Windows ? If MS-Windows you can use FindFirstFile() and FindNextFile() to get the file names. See examples on MSDN and [URL="http://www.daniweb.com/search/search.php?q=FindFirstFile"]here at DaniWeb[/URL].

Member Avatar for raul15791
0
606
Member Avatar for scru

[QUOTE=GrimJack;629326]For you guys who have never had a suit fitted - the question "do you dress right or left" has to do with how you hang so the tailor know where to 'adjust' the fit of your trousers. But you probably knew that.[/QUOTE] I actually thought you meant "I dress …

Member Avatar for jwenting
0
149
Member Avatar for daviddoria

[QUOTE=daviddoria;629308] double Max(vector<geom_Point3> &Points, int n); min_x = Min(Vertices_, 0); [/QUOTE] Dave: Those are two different functions. Post the prototype for the Min() function, it apparently is different than for the Max() function which you posted. >>but then isn't it passing the entire array (which is very big in this …

Member Avatar for vijayan121
0
5K
Member Avatar for Thew

Do you mean this function? [code] void Weather::SetScheme(SceneArg *sceneArg) { memcpy(&mScheme,sceneArg,sizeof(SceneArg)); mIsLoaded = true; _update(); } [/code] The only problem I see in that function is that [b]sceneArg[/b] should be declared [b]const[/b]. Also check that it is a valid pointer.

Member Avatar for Thew
0
149
Member Avatar for Keyaku

Welcome to DaniWeb. >>Also, I really liked that you could donate me money in instructions that I give you Oh me too -- me too. :)

Member Avatar for Nick Evan
0
227
Member Avatar for QuantNeeds

You could use a std::string for input then convert to double if its not "N". [code] void compute() { char firstExam; std::string input; double secondExam, thirdExam,avg; cout << "Enter the 1st test score (N to end): "; cin >> input; //firstExam; while (input != "N") { stringstream str(input); str >> …

Member Avatar for QuantNeeds
0
132
Member Avatar for Mr.UNOwen

MS-Windows -- see these [URL="http://msdn.microsoft.com/en-us/library/aa363196(VS.85).aspx"]Communcations Resource Functons[/URL] If you read the links they will contain sample programs.

Member Avatar for Mr.UNOwen
0
237
Member Avatar for Dave Sinkula

When I was a kid growing up in central Iowa we called it pop. Where I now live we call it soda. I never did use [b]coke[/b] as a generic term for that substance.

Member Avatar for Infarction
0
150
Member Avatar for cb02061

Override the OnCalcel() method in the dialog. The below code works from any dialog box within the SDI or MDI program. [code] void CAboutDlg::OnCancel() { CWnd* pWin = AfxGetMainWnd(); ::PostMessage(pWin->m_hWnd, WM_CLOSE,0,0); } [/code]

Member Avatar for cb02061
0
376
Member Avatar for styzer
Member Avatar for brianK

Welcome to DaniWeb. You will get lots of help around here -- just ask away in any of the tech boards.

Member Avatar for selfhelpebooks
0
25
Member Avatar for triastono86

Welcome to DaniWeb -- care to share other personal info with us, such as where you are from ?

Member Avatar for selfhelpebooks
0
18
Member Avatar for vidaj

That is C++ code, not C. To compile with a C compiler you have to move line 7 to immediately after line 2. Why use a [b]do[/b] loop ? It does nothing at all. You can achieve the same thing if you delete lines 2 and 20. If malloc() fails …

Member Avatar for jephthah
0
270
Member Avatar for thehype2049

main() has two optional arguments that are the number of command line arguments and an array of strings are are the arguments [code] int main(int argc, char* argv[]) { } [/code] argc is always >= 1 because argv[0] is the name of the executable program. In your example [icode]joinTextFiles chapter1.txt …

Member Avatar for iamthwee
0
109
Member Avatar for Syllabus
Member Avatar for Ancient Dragon
0
29
Member Avatar for rishabh2011

[URL="http://www.winprog.org/tutorial/"]tutorial[/URL] download free [URL="http://cplus.about.com/od/learnc/ss/vc2008_2.htm"]VC++ 2008 Express[/URL] compiler or [URL="http://www.bloodshet.net"]Dev-C++. [/URL]

Member Avatar for marco93
0
149
Member Avatar for Ancient Dragon

I've downloaded and compiled wxWindows using VC++ 2008 Express. Also am able to compile/link the Calculator example program (haven't tried the others yet). Now I want to begin writing my own program. So I searched google for tutorials to help get starte. None of them contain main(), and neither does …

Member Avatar for Nick Evan
0
163
Member Avatar for TacklesMcCaw

>> was wondering if anyone could provide any advice on how to create and use a dynamic library using gcc on Linux They are called [b]shared libraries[/b] on those operating systems. [URL="http://www.google.com/search?hl=en&q=how+to+create+shared+libraries+in+c%2B%2B"]Here are some google links[/URL].

Member Avatar for Ancient Dragon
0
91
Member Avatar for paulcat

>>How hard would that be? It may take anywhere from a couple days (for experienced programmers) to about a lifetime for beginners. For your compiler you might also want to download free wxWindows. Or if you want to use pure win32 api functions [URL="http://www.winprog.org/tutorial/"]here's[/URL] a tutorial.

Member Avatar for Maulth
0
267
Member Avatar for ericstenson

This isn't a porn site, so don't bet that something like that will get started. If you want a dating service then go to something like MySpace.

Member Avatar for jephthah
0
471
Member Avatar for Kob0724

[code] colHeadVector = new std::vector<QLabel*>(); //line 342 rowHeadVector = new std::vector<QLabel*>(); //line 343 widgetVector = new std::vector<std::vector<QWidget*>* >(); //line 344 arrayGrid = new QGridLayout(); //line 345 [/code] Why are those pointers? Just declare those vectors without pointers. You are not saving anything by making them pointers, instead you are creating …

Member Avatar for Ancient Dragon
0
192
Member Avatar for kux

Microsoft discontinued that feature with 2005. It was replaced by VCBuild.exe, which uses the solution file.

Member Avatar for Prabakar
0
404
Member Avatar for Malakai

>> promise to have your babies OMG you are desperate aren't you :) >>The std::map in VC98 seems to be playing up Have you tried compiling and running with more recent compiler? That compiler is extremely old. Download VC++ 2008 Express and test your program.

Member Avatar for Ancient Dragon
0
81
Member Avatar for tusharvichare
Member Avatar for tesuji
0
98
Member Avatar for Dortz

Thanks to this thread I found out why Notepad was unable to save an existing text file. I kept getting errors that it could not save the file even though I read the messages carefully and answeres Yes to them all. After reading this thread I went to control panel …

Member Avatar for indigo196
1
145
Member Avatar for techi_87

Welcome to DaniWeb Abbhie >>Eyes: black Are you sure? I never heard of a human with black eyes. You are human aren't you :) Maybe you mean you have [URL="http://en.wikipedia.org/wiki/Eye_color#Classification_of_colors"]grey eyes[/URL] ?

Member Avatar for zandiago
0
109
Member Avatar for asif.ishaq

Have you looked at the [URL="http://www.boost.org/doc/libs/1_35_0/doc/html/date_time.html"]boost libraries[/URL] ? I don't know if their time functions contain milliseconds or not.

Member Avatar for Ancient Dragon
0
245
Member Avatar for Metalsiege

It compiled without error for me. What error message(s) did you get with your compiler. I used VC++ 2008 Express.

Member Avatar for Ancient Dragon
0
108
Member Avatar for camproject

did you try to find a solution using google ? [url]http://www.google.com/search?hl=en&q=play+movies+with+c%2B%2B&btnG=Search[/url] [url]http://www.astahost.com/info.php/how-play-videos-using-c_t11387.html[/url]

Member Avatar for Ancient Dragon
0
67
Member Avatar for Kadence

Here is a simple example. You need to overload the [] operator, as below. [code=cplusplus] const int MAXSIZE = 20; class MyClass { public: MyClass() { x = 0; for(int i = 0; i < MAXSIZE; ++i) array[i] = i+1; } int& operator[](int n) {return array[n];} private: int x; int …

Member Avatar for Kadence
0
92
Member Avatar for QuantNeeds

The [b]for[/b] statement is actually explained on page 97. paragraph 6.5.3.3 shows the correct syntax. Without doing any research I'll bet there has been a later correction to 6.5.3.1 and what was shown at the botton of page 95.

Member Avatar for QuantNeeds
0
795
Member Avatar for Traicey

>>What usually be the cuase of the file reading the wrong data A bug in your program.

Member Avatar for Ancient Dragon
0
127
Member Avatar for senthilvnr08

Welcome to DaniWeb. I don't know the first thing about PHP but there are several other experts here that can help with your questions -- or you can help others with their problems.

Member Avatar for senthilvnr08
0
76
Member Avatar for riahc3

You don't put the function implementation code in *.h files then include the header file in two or more *.c files, or include it more than once in the same *.c file. That is what is causing the duplicate declaration errors. Put only the function prototypes in the header files …

Member Avatar for Ancient Dragon
0
117
Member Avatar for comply or die

The comparisons are not limited to just one field within a class or structure, you can compare as many class objects such as strings that you want to. In the comparison, if the two names being compared are the same then compare the code.

Member Avatar for Ancient Dragon
0
123
Member Avatar for aksikan

Now that you have posted your homework assignments, what are you asking from us ?

Member Avatar for Ancient Dragon
0
158

The End.