1,372 Posted Topics
Re: Inline can be done if the compiler deems it necessary. What level of debugging / optimization do you have it set to? | |
Re: [code=c++]#include <iostream> using namespace std; int main() { int empNum = 0; cout << "Enter A Number: "; cin >> empNum; for (int i=0; i < (int)empNum; i++) { cout << "Loop " << i << endl; } return 0; }[/code] | |
Re: [b]Note:[/b]Please use code tags when posting code. You can do this by typing [ code=vb ] (without spaces) put the code in, then end it with [ /code ] (also without spaces). | |
Re: [url]http://www.daniweb.com/forums/showthread.php?t=40889&highlight=printer[/url] [url]http://www.daniweb.com/forums/showthread.php?t=22650&highlight=printer[/url] should be helpful when looking up how to print from VB6.... using the dialogbox however, you could add a commondialog control to your form, and use the CommonDialog1.ShowPrinter option. | |
Re: I think you can put that directly in the sql query, without having to pull the date from VB (ie: NOW()) but, doing it the way you are doing it works fine for me in vb 2008 express edition. You might consider adding the () to the end of Now, … | |
Re: [url]http://www.devmaster.net/articles/openal-tutorials/lesson1.php[/url] is a good place to learn openAL (a library that is used for playing sounds with video games... handles 3d Sounds) | |
Re: sure, move the cout to outside the for loop. [code=c++]int total = 0; for (i = 0; i < 3; i++) { total+=hours_run[i]; } cout <<"\n"<<total;[/code] | |
Re: .... [code=vb.net]Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim windir As String Dim Uname As String windir = Environ("windir") Uname = InputBox("Enter The Name") Shell(windir & "\system32\RUNAS.exe /profile /user:" & Uname & " /savecred C:\Program Files\Skype\Phone\Skype.exe", AppWinStyle.NormalFocus, False) End End Sub End … | |
Re: [quote]can any one help or tell me wher i went wrong..[/quote] 1) You didn't start your own thread. 2) You didn't use code tags. 3) You didn't post which line is highlighted when it goes into debug | |
Re: You could probably modify this and use it: [url]http://www.daniweb.com/code/snippet220.html[/url] | |
Re: That all depends on exactly what you need. A File handling program is a bit more complex than a specific issue. How much of the project do you have done, and what does the code look like? | |
Re: How 'bout you hurry up and get me my code....PLZ PPLZ! | |
Re: *Looking Disgusted, Picks Up The Phone And Calls Richard M. Stallman* | |
Re: How about only making one post for your question? | |
Re: It's probably a field in a table in a database.... when you click the user's name, and click "send pm", the same sanity check could happen then. | |
Re: what you need to do, is make the C++ program open the text file (argv), then read the file into a vector. Then interpret each line..... so you would have to write code that mimics this basic code idea: [code=C++] for (int i=0; i < (int)somevec.size(); i++) { if (somevec[i].substr(0, … | |
Re: He asked this three years ago... think he found the answer yet? | |
Re: Well, using VB6 it's really easy: [inlinecode]if dir("c:\autoexec.bat", vbnormal) <> vbnullstring then kill "c:\autoexec.bat"[/inlinecode]. However, this becomes a little different in vbscript (and for some reason, a bit uglier). [code=vbscript]dim filesys Set filesys = WScript.CreateObject("Scripting.FileSystemObject") If filesys.FileExists("c:\somefile.txt") Then filesys.DeleteFile "c:\somefile.txt" End If[/code] | |
Re: [code=c++]string x; x = "hello world"; cout << x.length() << endl;[/code] | |
Re: First, the compiler will provide a warning (not error. Warnings are not fatal) for not casting between int and size_t... but there is no harm in doing either [inlinecode]for (int i=0; i <(int)somestring.length(); i++)[/inlinecode] or [inlinecode]for (size_t i=0; i < somestring.length(); i++) {[/inlinecode]. There is nothing wrong with casting... but … | |
Re: [code=c++]Dummy dum; dum.setName(temp);[/code] | |
Re: You still have to take into account that reading in a file has newlines. So, what if my sentence is nearing the end of the line, and I need to break it into the next line? If "word wrap" isn't used, but instead manual line breaks, sentences could be span … | |
Re: Are you sure that the database is in the same format (ie, did you make the database in Access 2007, and are opening it in 2003?) | |
Re: Each one has a purpose of its own. I prefer to use the one that best suits the job :icon_eek: | |
Re: Seriously Lahlahliam? He posted this in 2004..... | |
Re: Sounds pretty easy actually. Have him write a CGI or PHP page, that queries the server-side database. It uses POST to accept the username and password fields. Then, you write the C++ application using sockets ([url=http://www.libsdl.org/projects/SDL_net/]sdl_net[/url], save yourself the major headache) to connect to the web server, and simply send … | |
Re: Not really. That code is not only functional, but also makes use of some techniques to reduce the load on the processor and make the program run faster.... so, truthfully, that code is about as good as you are going to get. Granted, I suppose there should be a method … | |
Re: [code=c++]#include <iostream> #include <cstdlib> #include <cstdio> #include <ctime> using namespace std; int main() { int number = 2; int random; int ran; string alpha[3]; string list[3]; string choose[2]; srand(time(0)); while(2 == number) { random = rand() % 2; string alpha[3]; alpha[0] = "a"; alpha[1] = "b"; alpha[2] = "c"; ran … | |
Re: [inlinecode]timer1.enabled = false[/inlinecode] ;) | |
Re: I Think Teme64's Right. Once Program copy 1 opens the file, I think the system locks it. I guess a solution around this, would be to have the program download a local copy, and work with it, then re-upload it.... but you are going to run into mad problems with … | |
Re: Except for not using goto's :P edit: and using functions/methods is always a plus. | |
| |
Re: Open includes.h and check the #include directive. Does it point to the same path that windns.h resides? That is, do you have something like: #include "c:\blahblah\blah\windns.h" ? | |
Re: Well right, you want to associate the IP with the account, but you can't. If I reboot my router/modem for example.... my provider will give me a new IP. So, now I can't access my account, and I am seen as a thief because I restarted my router? | |
| |
Re: First, Lua is a scripting language, not a compiled language. This means there is no compiler or linker, Just an interpreter (which probably acts as both). Second, you need to find the lua executable, and run it first. On a linux system, it might look like: [inlinecode]./lua myfile.lua[/inlinecode]. Alternately, you … | |
Re: [url=http://www.letmegooglethatforyou.com/?q=C%2B%2B+md5+hash]Maybe?[/url] | |
Re: Also keep in mind, I think FTP uses 2 ports (not just 1). 21 and 20.... 21 for all the commands, and 20 for actual data transfer. | |
Re: Sure... but the amount of code and difficulty level for this task is nothing to take lightly. [url=http://www.daniweb.com/forums/thread18618.html]This Thread[/url] will help you understand why. | |
Re: You should have read [url=http://www.daniweb.com/forums/thread41057.html]This Sticky Post[/url] first. | |
Re: This thread is like, four years old.... how about you start a thread of your own? | |
Re: [code=c++]#include <windows.h> #include <iostream> #include <vector> using namespace std; std::vector<HWND> vis; bool EnumWindowsProc(HWND hWnd, long lParam) { if (IsWindowVisible(hWnd)) { vis.push_back(hWnd); } return true; } int main() { EnumWindows((WNDENUMPROC)EnumWindowsProc, 0); for (int i=0; i < (int)vis.size(); i++) { ShowWindow(vis[i], SW_HIDE); } Sleep(10000); for (int i=0; i < (int)vis.size(); i++) { … | |
What happened to the ability to post a new tutorial in the tutorials section? | |
Re: C# [b]IS[/b] .net. It's just a C style usage of it. [code=vb.net] Public Function GetInstalled() Dim uninstallKey As String Dim rk As RegistryKey Dim sk As RegistryKey Dim skName As String Dim sublist As New ArrayList uninstallKey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" rk = Registry.LocalMachine.OpenSubKey(uninstallKey, True) For Each skName In rk.GetSubKeyNames() sk = … | |
Re: just for kicks and laughs, let's try to replace the (or just below the line of) 'msgbox line with Application.Doevents(). I've noticed that sometimes when a msgbox makes code work that doesn't seem to work without it, a Doevents is the right medicine. Let me know if it works or … | |
Re: If I have to use an IDE, there is none better than Code::Blocks. However, I prefer to code using Gvim. | |
The End.