15,300 Posted Topics

Member Avatar for vampgirl13
Member Avatar for vampgirl13
2
112
Member Avatar for danibootstrap

call win32 api function [URL="http://msdn.microsoft.com/en-us/library/bb762153%28VS.85%29.aspx"]ShellExecute[/URL] [URL="http://lmgtfy.com/?q=ShellExecute"]More here[/URL]

Member Avatar for danibootstrap
0
279
Member Avatar for Wtyy
Member Avatar for stevenpetersen

Maybe we could have a points system to grade questions on how stupid they are. Like "URGENT! My program's broke, please fix it, and be quick about it.". On a scale of 1 to 10, that deserves a 10 for one of the most stupid idiotic posts that occasionally come …

Member Avatar for stevenpetersen
0
538
Member Avatar for bufospro

why the pointers? [code] int function(user* users, int id, char name[], char surname[]){ strcpy(users[id].name,name); strcpy(users[id].last,surname); users[id].id=id2; } [/code] And in main() you need to initialize the strings and int before passing them on to that function. If you don't then your program will just be so much crap. It will …

Member Avatar for bufospro
0
93
Member Avatar for Pim
Member Avatar for roger.hungchan

Take it one small step at a time, and soon you will have that program written. First learn how to open a file and read it one line at a time. After you have that working, learn how to split up the rows into columns (you can use stringstream c++ …

Member Avatar for Ancient Dragon
0
128
Member Avatar for Rudolfovich

I assume you mean SQL type databases, such as Microsoft Access, SQL Server, Sybase, Oracle, etc. win32 api does not support databases. You have to use something else, like ODBC. If all you want is simple files then use the functions in <fstream>. Google is your friend, so google for …

Member Avatar for Ancient Dragon
0
170
Member Avatar for roon01xpro

>>How do i assign a string to a array? 1) add [icode]#include <vector>[/icode] 2) create an array of strings [icode]vector<string> aList;[/icode] 3) add a string to the vector: [icode]aList.push_back( "Hello World" );[/icode]

Member Avatar for Ancient Dragon
2
98
Member Avatar for may i ask u?

To create a new console application: From the menu File --> New --> Project, select [b]Win32[/b] in the Project Types, then [b]Win32 Console Application[/b] in the Templates. At the bottom enter the project name and location, then hit Ok button. The rest you should be able to figure out. If …

Member Avatar for Ancient Dragon
0
116
Member Avatar for ge6a93

Check the OnTimer event handler, maybe there is something that causes the window to be repainted.

Member Avatar for ge6a93
0
105
Member Avatar for number87

you need to use a loop and divide the number by 10 until the result is 0. you can delete lines 10 thru 19 because they are not relevent to the program requirements. The answer to the program has nothing to do with a space.

Member Avatar for taepodong1101
0
203
Member Avatar for Ashishinani1756

First you have to learn how to generate the list of prime numbers. There are lots of examples here, just search for them. Use the "Site Search" button located in the upper-right corner of the DaniWeb yelllow (gold?) band.

Member Avatar for donaldw
0
94
Member Avatar for combustion

you are attempting to put code outside a function. Lines 7 and 8 have to be inside a function.

Member Avatar for Ancient Dragon
0
260
Member Avatar for gilli99

See [URL="http://www.file.net/process/netfxupdate.exe.html"]this related thread.[/URL]. If the file really is not in the directory you posted then you might need to reinstall the .NET framework.

Member Avatar for caperjack
0
92
Member Avatar for Philly0494
Member Avatar for Ancient Dragon
1
109
Member Avatar for Ragoune

line 9: >> char *value = ; Will that even compile ???? >>DWORD value_size = sizeof(value); value is a pointer, and the sizeof(any pointer here) is 4 on most 32-bit platforms. you don't have to put that in a loop. Call it the first time with the size of the …

Member Avatar for Ragoune
0
3K
Member Avatar for Carrots

>>What datatype should I use for storing the line? ie: the 'storelinevariable' parameter? If you use getline() then it has to be std::string object What do you want to do with the lines after they are read into memory? Do you need to use individual columns, do you want to …

Member Avatar for Ancient Dragon
0
165
Member Avatar for ge6a93

Your timer event handler is probably doing something that makes the screen to be repainted. If the event handler takes a long time to process then turn kill the timer at the beginnning of the event handler and restart it just before it returns to prevent MFC from calling it …

Member Avatar for Ancient Dragon
0
105
Member Avatar for jaison2
Member Avatar for Benderbrau

[QUOTE=Ryshad;1043749]Exactly, if the OP is satisfied that the problem has been resolved then there is no need for solvers to continue contributing to the thread. Marking the thread as solved means they can see from the forum page that the OP no longer needs help. [/QUOTE] Although technically you are …

Member Avatar for Geekitygeek
1
596
Member Avatar for leeba

lines 31-36: You are getting a character from the keyboard but tossing it into the bit bucket (not doing anything with it). You need to create a character array and save the characters in it. >>strtok(c," "), strtok() works on character arrays, not single characters. Passing variable [b]c[/b] as the …

Member Avatar for leeba
1
91
Member Avatar for fragtech

why is year a double??? There are no decimal places in a year unless you want 1.5 to be a years and 6 months.

Member Avatar for fragtech
0
719
Member Avatar for StaticX

line 18: >> fstream* file = new fstream( "myfile.txt", fstream::in); There is absolutely no reason to complicate things more by making fstream object a pointer which has to be allocated. Just create an fstream object [icode]fstream file("myfile.txt, ios::in);[/icode]. Note that ios::in will NOT create a file if it does not …

Member Avatar for Ancient Dragon
0
121
Member Avatar for Byrondude

[URL="http://lmgtfy.com/?q=wholesale+fruit+fly+products"]Start here[/URL]

Member Avatar for Ancient Dragon
0
101
Member Avatar for samsons17

The while statement is wrong. If I enter a '1' the loop will continuje because it is not an 'a', which is one of the tests. Try this [icode]while (test<"1" || test>"5" && test !="a" && test!="b");[/icode]

Member Avatar for Ancient Dragon
0
117
Member Avatar for fatalblade
Member Avatar for Ancient Dragon

This demonstrates how to get a list of your computer's logical drive letters under the MS-Windows operating system.

Member Avatar for Ancient Dragon
2
926
Member Avatar for Vishu Madaan

what's your program going to do if I enter 15 for rows and 20 for columns??? Do you have a question about the code you posted?

Member Avatar for Ancient Dragon
0
95
Member Avatar for imolorhe

[QUOTE=imolorhe;1045072]Please i need d code for C.[/QUOTE] Stop whining and begging. The code he provided is practically C.

Member Avatar for Calipe
-5
205
Member Avatar for Death20

Using win32 api gdi functions you could disable the mouse by just hiding it then ignoring all mouse clicks. For keyboard, ignore the keyup and keydown events. Note that these are not standard c or c++, but win32 api functions. There is no way to do it with standard c/c++.

Member Avatar for Death20
0
290
Member Avatar for ihatestarch

Pretty simple, really [code] bool Class_name::find_a_record(ifstream& is, string name) { Class_name n; is.seekg(0, ios::begin); // start at beginning of the file // while not end-of-file or error while( is.read( (char*)&n, sizeof(Class_name) ) { if( name == n.name) // if found { return true; } } return false; } [/code]

Member Avatar for ihatestarch
0
101
Member Avatar for kavithabhaskar

what compiler are you using? It compiled and linked ok using VC++ 2008 Express. You can't use iostream.h and [icode]using namespace std;[/icode] at the same time.

Member Avatar for donaldw
0
3K
Member Avatar for Syakoban

why not just take the existing desktop and remove all the desktop shortcuts and start menu items except those that you want to allow. That would be a lot easier (quicker and cheaper) than trying to reinvent the wheel (desktop). And that solution requires zero programming.

Member Avatar for Ancient Dragon
0
99
Member Avatar for steball

>>The problem is, I don't know how many image files there are, until a run the program, and search a folder for the files. Use either a <vector> or <list> and problem is solved. Both will expand as needed.

Member Avatar for Ancient Dragon
0
135
Member Avatar for gerard4143

>>while ((addr = ((void*(*)(void))addr)()) Didn't your compiler produce an error or warning on that line?? tryit() does not return a value, yet in the above addr is being assigned the return value of tryint(). You can't have it both ways. try this: [icode] while( addr() ) [/icode]

Member Avatar for gerard4143
0
133
Member Avatar for cabosun

C programs are allowed to declare variables only at the top of the block enclosed with { and }. So move line 42 up to line 16.

Member Avatar for gerard4143
0
81
Member Avatar for dharanidaran

In its simplest form: [icode]g++ stock.cpp usestock.cpp -o myprogram <Enter>[/icode] You can also install Code::Blocks which will let you easily create and compile multi-file projects.

Member Avatar for Ancient Dragon
0
161
Member Avatar for valkerye

Because the name may contain one or more spaces you need to read the file one character at a time until the first digit is found, which will be the end of the name. [code] int i = 0; char c; while( infile.get(c) ) { if( isdigit(c) ) { infile.unget(); …

Member Avatar for Ancient Dragon
0
199
Member Avatar for Ancient Dragon

[URL="http://www.break.com/index/drunkest-guy-ever-goes-for-more-beer.html"]video[/URL] of a drunk trying to buy some more beer.

Member Avatar for bobfromphilly
6
200
Member Avatar for abie

>>However, some testing suggests that double still performs better! This is unexpected. Yup. floats are always converted to doubles when used as function parameters. Other factors may influence it too, such as the math coprocessor on your computer.

Member Avatar for mrnutty
0
173
Member Avatar for oluscoa

Here is the difference between Girlfriend 7.0 and Wife 1.0 operating systems (I've posted this before in geek's lounge) [quote] O/T Dear Tech Support Subject: Computer Hard and Software: Dear Tech Support: Last year I upgraded from Girlfriend 7.0 to Wife 1.0. I soon noticed that the new program began …

Member Avatar for jbennet
-1
101
Member Avatar for ellimist14

>> lines 12 and 53: binfile.open ("data.dat", ios::in); If this is a binary file then you need to open it in binary move [icode]binfile.open ("data.dat", ios::in | ios::binary);[/icode] line 52: add binfile.clear() to clear all file errors before attempting to reuse the same fstream. line 53: I think you have …

Member Avatar for rdrast
0
164
Member Avatar for thure

line 22: >> scanf("Selection: %i\n", o); You can't combine scanf() and printf() like that, and the parameter must be a pointer to an integer [code] printf("Selction: "); scanf("%i", &o); [/code]

Member Avatar for Aia
0
166
Member Avatar for newcpp

After calling the first function you have to clear the stream's eof() error bit. [icode]input.clear();[/icode] should fix the problem.

Member Avatar for Ancient Dragon
0
139
Member Avatar for tkud

[URL="http://lmgtfy.com/?q=c%2B%2B+linked+list+tutorial"]try this[/URL] In c++ I would use either <vector> or <list> c++ classes instead of creating your own linked list as you might do in C language.

Member Avatar for tkud
0
106
Member Avatar for Ashishinani1756

First learn how to list all the files on one directory, then the rest should not be all that difficult. How to get the list of the files will depend on the operating system( *nix, MS-Windows, MAC, etc. etc). Most of them do it differently then the others.

Member Avatar for Ashishinani1756
1
109
Member Avatar for power_computer

Yes, start out by opening the file and learning how to just read it. Just display the file contents on the screen. After you get that going, you should be able to start reading the file contents into the structure. You didn't say how the file is layed out so …

Member Avatar for power_computer
0
217
Member Avatar for ninja_girl

I assume you did not post all the code in those two function. If you are getting just some random values then you are probably using some uninitialized variables in those function. Post the entire program so that we can see what you are doing.

Member Avatar for Ancient Dragon
0
91
Member Avatar for Tales
Member Avatar for Ancient Dragon
-1
86

The End.