15,300 Posted Topics

Member Avatar for fakespike
Member Avatar for anu07
0
799
Member Avatar for frantonio

Here is a solution using inline assembly in c program [code] #include <iostream> using namespace std; int main(int argc, char* argv[]) { char s1[] = "Hello World"; char s2[255] = {0}; int len = 0; _asm { push esi push edi lea esi,s1 lea edi,s2 ; get length of string …

Member Avatar for wildgoose
0
3K
Member Avatar for Jeronim

Since URL is std::string you have to use its c_str() method [code] void openURL (string& URL){ ShellExecute(NULL, "open", URL.c_str(), NULL, NULL, SW_SHOWNORMAL); }[/code]

Member Avatar for Jeronim
0
1K
Member Avatar for loly

Post what you have done so far to resolve this. What compiler and operating system are you using, because it will make a difference how you create the threads.

Member Avatar for raviranjanprasa
0
2K
Member Avatar for Stefano Mtangoo

DLLs and *nix shared libraries are completely different animials. [URL="http://www.cs.duke.edu/~ola/courses/programming/libraries.html"]Here is a link[/URL] that explains how to create shared libraries. I suppose DLLs and shared libraries could use the same source files for the functions that are in them.

Member Avatar for Stefano Mtangoo
0
144
Member Avatar for charlie4oct

You need to write a MS-Windows GUI program, not a console program. [URL="http://winprog.org/tutorial/"]Here is an intro tutorial[/URL]. Note that the tutorial will not teach you everything, but just enough to get you started. There are several other ways to write Windows GUI, this is just the most basic.

Member Avatar for Ancient Dragon
0
91
Member Avatar for Ayaat Monem

One way is to use threads. Another way is to use non-standard functions contained in conio.h -- but your compiler may or may not suppport them.

Member Avatar for sinogoya
0
103
Member Avatar for broli100

call win32 api function [URL="http://msdn.microsoft.com/en-us/library/ms646312(VS.85).aspx"]SetFocus()[/URL]

Member Avatar for amart
0
401
Member Avatar for KAY111

post one of the files that has the errors, especially the top of the *.cpp file where you have all the includes etc. The problem is most likely missing something like this: [code] #include <iostream> using std::cout; [/code] or this [code] #include <iostream> using namespace std; // Not recommended [/code] …

Member Avatar for KAY111
0
15K
Member Avatar for makako nido

[URL="http://www.google.com/#hl=en&q=x86+assembly+file+i%2Fo&aq=f&aqi=&aql=&oq=&gs_rfai=&fp=9cf8b09982c85f48"]Here [/URL]are some links that mey help you -- the first one even has source code.

Member Avatar for Mattye134
0
171
Member Avatar for cmsc

why are the members of birthday char* instead of int? But to answer your question [code] node1->bday.month = malloc(32); // allocate space for 32 characters strcpy(node1->bday.month,"January"); [/code] but if you mande them integers [code] node1->bday.month = 0; // January [/code]

Member Avatar for cmsc
0
88
Member Avatar for svr2009wwe

You can use ODBC function calls -- there are some online tutorials, just google for it. Or you can install and use MySQL++ which is a c++ wrapper for all MySQL functions. Again, google will point you to the download area.

Member Avatar for tesuji
0
251
Member Avatar for mteberlein

>>sizeof(ExtCordMainForm->TxDiagMessageRxEdit->Text)*2)+ The sizeof operator doesn't work on std::string objects because sizeof will return the size of the c++ class, not the string which it manages. You should use Text.size() or Text.length() to get the length of the string Next that line seems to be allocating enough space for wchar_t UNICODE …

Member Avatar for mteberlein
0
281
Member Avatar for ankur_

One of [URL="http://www.google.com/#hl=en&q=ssl+in+linux&aq=0&aqi=g1g-m4g-ms1g-m2&aql=&oq=ssl+in+lin&gs_rfai=&fp=9cf8b09982c85f48"]these links[/URL] may help you.

Member Avatar for Ancient Dragon
0
65
Member Avatar for kiwimoosical

cin.get() waits for you to enter a number followed by the return key. >>if(cin.get()>>1); That line makes no sense. If you look at the documentation you will see that get() returns an istream object so using the right shift operator on that return value makes as much sense as mud. …

Member Avatar for Ancient Dragon
0
229
Member Avatar for sanagopi

If you meet all the requirements of "who can apply" then I'd think you would already know the material or what to study. If you are smart enough to get a bachelor's degree in Entineering then you will probably be smart enough to pass the test. But since I have …

Member Avatar for Ancient Dragon
0
136
Member Avatar for Ferny84
Member Avatar for Ancient Dragon
0
119
Member Avatar for hellosy

Turn off precompiled headers. Go to the project settings, c++ tab and you will see a category for precompiled headers.

Member Avatar for Ancient Dragon
0
38
Member Avatar for aianne

>>when I tried to run it, it suddenly closed That's because there is nothing at the end of main() to prevent that behavior. If you want it to stay open so that you can see it, then add [icode]getche();[/icode] at the end of main(). The program will then stop until …

Member Avatar for Adak
0
313
Member Avatar for dhruv_arora

What compiler are you using? Generally it is not a good idea to mix C and C++ code together in the same program.

Member Avatar for Ancient Dragon
0
349
Member Avatar for vsawant

Agree with Nick and Ed. Optimatization isn't really important at all to beginners, they should be more concerned with just learning the language. Optimization will come later in a year or so.

Member Avatar for ZootAllures
-1
151
Member Avatar for web3

Microsoft compilers are all shipped with conio.h and associated library.

Member Avatar for Ancient Dragon
0
234
Member Avatar for lewashby

It's "meet" people. "meat" is something you might eat such as a hamburger.

Member Avatar for Ancient Dragon
0
136
Member Avatar for akand

Do you know SQL? If not then you will have to read an S[URL="http://www.google.com/#hl=en&source=hp&q=sql+tutorials+for+beginners&aq=1&aqi=g10&aql=&oq=sql+tutorial&gs_rfai=CBTb881gbTJjHB4rAM5SijMkFAAAAqgQFT9A3tLg&fp=9cf8b09982c85f48"]QL tutorial[/URL] There is no one-line C solution for your question.

Member Avatar for tesuji
0
547
Member Avatar for web3

What GUI to use will depend on the operating system. For MS-Windows you have several options -- win32 api functions, wxWidgets, QT. Other compilers will also provide other options.

Member Avatar for Stefano Mtangoo
0
213
Member Avatar for MaestroS

Even if he had the PHP source code for that function it probably wouldn't do much good because it looks more like VB code than c or c++. >>having it in clean c++ would be useful in future... Of course you can write your own c++ function that simulates PHP's …

Member Avatar for Stefano Mtangoo
0
887
Member Avatar for Ancient Dragon

When I click the up or down arrow the thread gets an immediate vote even though a popup window has the option of cancelling it out (the x in the upper right corner). Would like to change the behavior so that nothing happens unless one of the two buttons at …

0
87
Member Avatar for iamcreasy

How long has that been happening? Just recently or a very long time? Did you install something that may have affected the compiler's installation? Try reinstalling Visual Studio, uninstall it completely first so that it will reinstall fresh. Does kernel32.lib actually exist on the computer? [edit]Oh, I reread your post …

Member Avatar for iamcreasy
0
2K
Member Avatar for eslmz

1. You must be compiling that program as c++, not C because C requires the keyword [b]struct[/b] before each use of the structure name, such as [icode]struct mystrut[/icode]. Change the file extension of the program file to *.c 2. >>(first+1)->number You can't access members like that because its a linked …

Member Avatar for UncleLeroy
0
131
Member Avatar for ryan461

Why is line 80 inside that if block? What good does it do? Line 80 declares an array of pointers which immediately goes out of scope and is destroyed.

Member Avatar for ryan461
0
399
Member Avatar for dhondie87

Ok -- here's the basic code [code] #include <stdio.h> int main(int argc, char* argv[]) { printf("Hello World\n"); } [/code]

Member Avatar for nbaztec
-3
134
Member Avatar for Ror1

scanf() leaves the Enter key '\n' in the keyboard buffer, so the next time scanf() is called it will only see '\n'. One solution is to replace scanf() with fgets() which will remove '\n' if there is room in the input buffer. Something like this: [code] int main() { char …

Member Avatar for Ror1
0
83
Member Avatar for Schoorsteen
Member Avatar for ankyG

what compiler and/or IDE are you using and what operating system ? How to link two or more *.c object files will depend on the compiler and/or IDE.

Member Avatar for Ancient Dragon
0
162
Member Avatar for AspiringCoder

Use mod % and division / operators. Since this is homework, sorry but I'm not going to say anything more about it until you post the code you have tried.

Member Avatar for AspiringCoder
0
187
Member Avatar for dansnyderECE

The parameters are mapped in the order in which they appear in the argument list. The first parameter on line 11 (a) is mapped to the first parameter on line 3. The second parameter on line 11 (b) is mapped to the second parameter on line 3. That mapping can …

Member Avatar for aman rathi
0
180
Member Avatar for Duki

I doubt that would be all that difficult -- sort of like picking a them for your windows computer desktop. The only thing I would make optional is the color selection -- fonts and other layouts would remain static as they are now. I personally don't like the purple, would …

Member Avatar for diafol
0
194
Member Avatar for dualdigger

Use MS Access to put a password on it. Then you will have to change your program to use that password when opening the database.

Member Avatar for nehasidana
0
198
Member Avatar for fishwater00

My GUESS is that your program contains bugs that went unnoticed or undetected under UNIX. Post the code. [edit]Nevermind -- glad you found the problem :) [/edit]

Member Avatar for JOAT
0
102
Member Avatar for usafsatwide

Post the first couple errors so that we can help you decipher them. I can tell you right now that line 27 and 66 are wrong. Must be like this: [icode]void MovieDisplay(MovieData m1, MovieData m2)[/icode] But then even that does not satisfy the program requirements. You have to pass the …

Member Avatar for NathanOliver
0
422
Member Avatar for kubatur0

line 27: The argument to strlen() is a char* or const char*, not FILE*. FILE is not a character array.

Member Avatar for oieronle
0
105
Member Avatar for gcardonav

Compilers like to puke out a lot of errors for the same line. And an error on one line can spew out a lot of errors on other succeeding lines. So in practice I generally fix the error at the top of the list then recompile to get a new …

Member Avatar for gcardonav
0
147
Member Avatar for iqra123

clients ask information from servers, not the other way around. In your case your server is acting as the client, and the clinets are the servers. So you have one client with many servers. Or you could have the clients periodically push the information to the server intead of having …

Member Avatar for iqra123
0
82
Member Avatar for pubis

People are not here to write your programs for you or do your homework. Hence we say "do this" or "do that" instead of giving out actual code. The first thing you need to learn is how to use google and read MSDN. google for the function and you will …

Member Avatar for pubis
0
136
Member Avatar for Supriyo

If you know how to pass the data to one function then there should not be a problem passing it to a million or more functions. The number of files (*.c or *.cpp) has nothing to do with it.

Member Avatar for rahul8590
0
252
Member Avatar for glenc70

The memory is not really lost "forever" -- most operating systems reclaim the memory when the program itself exits either normally or abnormally (crashes). When using current versions of MS-Windows or *nix it is not necessary to reboot the computer.

Member Avatar for Nick Evan
0
100
Member Avatar for mnf
Member Avatar for Ancient Dragon
0
73
Member Avatar for ibrahim72ro

line 1: its [b]int main()[/b] never ever [b]void[/b] main() line 7: feof is a function and it needs to be written as feof() line 9: why are you using cin to read from a file? cin gets information from the keyboard (YOU type the characters) not from the file. lines …

Member Avatar for Ancient Dragon
0
140
Member Avatar for Kartik_shashank

>>Unfortunately, it is impossible to use a window proc on the console window I just tried SetWindowLong() to hook into the WinProc inside the os, but it doesn't work. According to MSDN [quote][b]Windows NT/2000/XP[/b]: You cannot change this attribute if the window does not belong to the same process as …

Member Avatar for gowthamsettu
0
1K
Member Avatar for Duki

I don't like it at the bottom either -- just makes it more difficult for new people to learn how to use DaniWeb.

Member Avatar for happygeek
2
214

The End.