15,300 Posted Topics

Member Avatar for gil_mo

[URL="http://msdn.microsoft.com/en-us/library/3y1sfaz2(VS.80).aspx"]Here [/URL]is an explaination of how I use it. I always use it with __declspec and don't have a problem. It does not affect the .DEF file -- actually the DEF file is not even needed when dllexport is used.

Member Avatar for gil_mo
0
159
Member Avatar for tondeuse34

Yes, writing GUI in c++ is pretty difficult stuff. Other languages such as python, vb, and C# are better suited for that. I don't think you can process mouse events like that in console programs. The program needs a message pump in order to get and process windows event messages, …

Member Avatar for William Hemsworth
0
9K
Member Avatar for c++ newbie
Member Avatar for xlx16

There is no standard way to do that in C or C++ because the languages don't know a thing about the function or arrow keys. But there are work-arounds and they all depend on your compiler and operating system. One way is to use the [b]curses[/b] library, or pdcurses on …

Member Avatar for Ancient Dragon
0
230
Member Avatar for tekivia80

Do you know how to create a class? Lets start with the easiest one -- date [code] class date { }; [/code] Next you want to add a few data objects, such as day, month and year [code] class date { private: int day; int month; int year; }; [/code] …

Member Avatar for Ancient Dragon
0
129
Member Avatar for c++ newbie

line 87: array elements are numberd from 0 to but not includeing the number of elements in the array. So that loop should be coded like this: for (int hw_c = [color=red]0[/color]; hw_c [color=red]<[/color] MAX_HW; hw_c ++) line 89: that's initializing the wrong array. It should be initialzing array [b]hw[/b]. …

Member Avatar for Ancient Dragon
0
160
Member Avatar for c++ newbie
Member Avatar for compumasta

structs are nearly identical to classes, so maybe you need to add an = operator [code] struct if1 { string idnum;//id number for the student string lastname;//last name of student string firstname;//first name of student int examscore[maxexam];//array of all the exam scores of the student int hwscore[maxhw];//array of all the …

Member Avatar for compumasta
0
935
Member Avatar for summonkhan

Two suggestions: 1) Learn to write better English. Practice makes perfect. 2) Post your resume in the [URL="http://www.daniweb.com/forums/forum52.html"]Post Your Resume[/URL] board.

Member Avatar for Ancient Dragon
0
21
Member Avatar for chlipala
Member Avatar for chlipala
0
66
Member Avatar for Jennifer84

1) file size is an unsigned integer not a double. 2) >> double filesize = path.size(); All that is doing is getting the number of characters in the string, not the file size Here is how to get the file size [code] size_t fileSize = 0; string path = "C:\\Folder1\\Folder2\\OneFile.txt"; …

Member Avatar for Jennifer84
0
174
Member Avatar for msk88

Are you talking about writing a plug-in for Windows Explorer ? When you right-click a file in Explorer it will add to its popup menu item(s) that you write ? I have seen something like that I think at [url]www.codeproject.com[/url], but don't recall how it is done. [edit]Ok I think …

Member Avatar for Ancient Dragon
0
110
Member Avatar for tigger0484

I'm not sure how to play this game but here are my answers [code] Choose one 1. Make a move 2. Save the game 3. Quit 1 Player 1 Would you like to move piece A, B, C, or D? a Please choose a move 1 2 3 4 X …

Member Avatar for Ancient Dragon
0
108
Member Avatar for dan_e6

The nodes might be easier to sort if you put the data in another structure [code] struct data { string bookTitle; vector<string> authors; }; struct node { struct data* pData; node *next; }; node *start_ptr [/code] Now when a swap needs to take place all you have to do is …

Member Avatar for dan_e6
0
100
Member Avatar for iammop

I think it opens the file, gets the file length, allocates a buffer if the required size, then checks if any character elements is > 126, which is the upper limit of the text characters in the standard ascii chart. So I would think this would work. Note: the following …

Member Avatar for Ancient Dragon
0
120
Member Avatar for maui_mallard

[QUOTE=linux;571700]You know you're obsessed when you have more posts than the creator of the forum, and you joined three years after her. *cough*jbennet*cough* :)[/QUOTE] That's not hard to do when you play those silly games in the games forum.

Member Avatar for jbennet
2
311
Member Avatar for Black Magic

>>Is this best solution? No. srand() should only be called once during the lifetime of the program. Leave lines 12 and 14 but delete lines 18, 20, 24 and 26. >>#include <conio.h> That is non-standard function. If you want [b]best[/b] solution than delete it. line 45: delete it. use cin.get() …

Member Avatar for Black Magic
0
102
Member Avatar for edek

pipes don't work at all in win32 programs, only console programs on Ms-Windows platforms. See the discussion [URL="http://msdn.microsoft.com/en-us/library/96ayss4b.aspx"]here[/URL] for work-around.

Member Avatar for Nick Evan
0
214
Member Avatar for wleemitch

create an ifstream object and use its >> operator to skip the first word and read the second. [code] ifstream in("file"); string word; in >> word; // read "Add" in >> word; // read the digits [/code]

Member Avatar for wleemitch
0
196
Member Avatar for sfurlow2

with your feet :) That probably means to create a loop and inspect each element. For example: [code] int array[5]; for(int i = 0; i < 5; i++) cout << array[i] << " "; [/code]

Member Avatar for VernonDozier
0
136
Member Avatar for sfurlow2

you have to call srand() to generate a new set of numbers - and its only called once at the beginning of the program. [code] #include <stime> ... int main() { srand( time(0) ); } [/code]

Member Avatar for Blondeamon
0
92
Member Avatar for El Duke

post the code you have tried. When the first letter is 'o' then just call strcpy() to copy the entire word. But whether that will work or not all depends on how you declared the two arrays. Post how you declared the two arrays and the rest of your program.

Member Avatar for El Duke
0
162
Member Avatar for Prabakar

I have no idea what it is doing either, but it displays an interesting map.

Member Avatar for Prabakar
0
156
Member Avatar for rkittu2000

[URL="http://www.google.com/search?hl=en&q=c%2B%2B+sql+classes"]read these google links[/URL]

Member Avatar for jephthah
0
41
Member Avatar for Wordgunner

Welcome to DaniWeb. Chicago, the windy city. My brother lives near Chicago. Do you know him :) For those of you who might not know, Chicago is USA's 3d largest city with about 10 million people. Its so tiny I just assumed Wordgunner would know my brother.

Member Avatar for Serunson
0
76
Member Avatar for elementz

Look up the functions in MSDN. It will often provide C++ examples as well as C#.

Member Avatar for marco93
0
128
Member Avatar for computers08
Member Avatar for BusWheelie

>>you could also use signature links Yes, that's a good suggestion. Here at DaniWeb you can go to your [b]Profile[/b] and add your links to your signature. Then do a whole bunch of posting in other threads to help others or in [b]Geeks Loung[/b] just to talk.

Member Avatar for ericchoo
0
132
Member Avatar for jakesolochek
Member Avatar for Squeeker

A literal is a string of characters inside quotes. For example [icode]char str[] = "Hello World";[/icode] In the above, [b]"Hello World"[/b] is considered the literal.

Member Avatar for Squeeker
0
185
Member Avatar for dazed&confuzed

>>get a fair amount of warnings, but i can live with warnings You are crazy if you do because most warnings are really errors. Fix them. line 2: never ever at any time should you include one *.cpp in another like that. Compile them separately and link them together. That's …

Member Avatar for dazed&confuzed
0
111
Member Avatar for Zubb

[QUOTE=Zubb;601274]A fellow mate from class gave me that code, he's been working on. I posted it here to see if it was correct or not.[/QUOTE] So, you wanted to hand in some else's piece of crap as your own ?? Don't you think your instructor will notice the resemblence?

Member Avatar for Ancient Dragon
0
180
Member Avatar for sonic_geezer

First, delete that compiler from your computer since the free trial has expired. Next, download the free [URL="http://www.microsoft.com/express/vc/"]VC++ 2008 Express[/URL]. This is NOT a trial version and does not expire. As for the *.exe requiring Visual Studio, it depends on how you program. You can freely distribute the files located …

Member Avatar for sonic_geezer
0
87
Member Avatar for vedmack

[edit]On second thought, I don't think below is what you are looking for[/edit] Here's how to hide the console window [code] #include <windows.h> int main() { HWND hWnd = GetConsoleWindow(); if(hWnd) ShowWindow(hWnd, SW_HIDE); Sleep(5000); } [/code]

Member Avatar for Ancient Dragon
0
113
Member Avatar for server_crash

you must close the file before it can be deleted. use fin.close() before attempting to delete it.

Member Avatar for Salem
0
249
Member Avatar for jimJohnson

>>Any ideas what I should request for a salary for an entry level developer Yes, ask for at least $1,000,000.00 USD per hour :)

Member Avatar for Salem
0
107
Member Avatar for manojkumar2004

windows and *nix have different implementations so you can't use the same program for both. For MS-Windows you include <windows.h>. You can use threads by calling CreateThread() in console programs, but I think it will requires a win32 windows program to successfully use the SetTimer() and KillTimer() functions because the …

Member Avatar for manojkumar2004
0
411
Member Avatar for natd

I would assume the transaction file is in no particular order -- rows are appended to the transaction file as they occur, which can be in any order for any given account. To update the balance in the master file you will have to read the entire transaction file to …

Member Avatar for Ancient Dragon
0
120
Member Avatar for nguerrero03

>>and I'm supposed to include an application file, but I don't have the slightest clue by what the professor means by that The application file is a *.cpp file that contains main(). I would assume from your comment that main() should not be in the same file as the class …

Member Avatar for Ancient Dragon
0
88
Member Avatar for tinazmail

what programming language is that ? Need to move this thread to the appropriate board for that language.

Member Avatar for shouvik.d
0
182
Member Avatar for Aamit

The file is still open. Close it first before trying to rename it. Move line 22 up to about line 16

Member Avatar for Prabakar
0
355
Member Avatar for wing43

You are on the right track. How did you declare those arrays ? And what is [b]inquestion[/b]?

Member Avatar for Ancient Dragon
0
114
Member Avatar for nurulshidanoni
Re: Void

>>Why the selection sort output not appear? Because it is never called.

Member Avatar for nurulshidanoni
0
139
Member Avatar for toolbox03

When you call getline() it will return an empty string when there is an empty line. Example: [code] #include <iostream> #include <fstream> #include <string> using namespace std; int main() { string line; ifstream in("stdafx.h"); if( in.is_open() ) { while( getline(in,line) ) { if( line == "") cout << "Empty line\n"; …

Member Avatar for toolbox03
0
972
Member Avatar for MJFiggs

Here is how I code that function. [code] void testSort(int test[], int SIZE) { for (startScan = 0;startScan < (SIZE-1); startScan++) { for(int count = startScan +1; count <SIZE; count++) { if (test[startScan] < test[count]) { int temp = test[startScan]; test[startScan] = test[count]; test[count] = temp; } } } } …

Member Avatar for MJFiggs
0
116
Member Avatar for DogsAfire

you might try [icode]#pragma optimize(...)[/icode] [URL="http://msdn.microsoft.com/en-us/library/aa273912(VS.60).aspx"]See this[/URL].

Member Avatar for Ancient Dragon
0
118
Member Avatar for c++ newbie

lines 27 and 29: what is that '/' character doing there? Your compiler whould have given you an error on those lines. To stop the loop at line 72 you have to enter Ctrl+Z + Enter keys.

Member Avatar for Ancient Dragon
0
159
Member Avatar for Adrian99420

Here's how to do it. [icode]fprintf(myfile,"Set wallpaper= \"%s\"\n",textbox1->text);[/icode]

Member Avatar for Ancient Dragon
0
146
Member Avatar for gareth_2006

It required the gcc comcompiler, which I don't have. But after uncompressing the file read the [b]readme.txt[/b] file.

Member Avatar for Ancient Dragon
0
39
Member Avatar for nimirraj99

>>void addCourse (courseInfo addList[]) It would be better if all you did was pass only one array element and pass it by refernece [code] void addCourse (courseInfo& addItem) { cout << "Enter the course title:" << endl; cin >> addItem.courseName; cout << "Enter the course CRN:" << endl; cin >> …

Member Avatar for Ancient Dragon
0
100

The End.