No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
13 Posted Topics
My database has a list of events, and I'd like to return it sorted by date. However, I'd like to have the past events be forced below more recent events, so I try to do this: ( SELECT name, date FROM events WHERE date >= curdate() ORDER BY date ) … | |
Re: I think you'll need to use Vectors, which are like arrays, but can have their dimensions altered during runtime: [url]http://www.cppreference.com/wiki/stl/vector/start[/url] | |
Re: It seems like this is what you're doing now (using object types int and simplified variable names): [code=cplusplus]int* pointer = 0; int* rabbit = new int(5); // rabbit = 0x0134a1a8 and *rabbit=5 (the value at address 0x0134a1a8) pointer = rabbit; // pointer = 0x0134a1a8 and *pointer = 5 // we … | |
Re: error checking and "dummy proofing" aside, you can probably store the input value to a string variable, then use the string methods with loops to process the string. Specifically, erase and find_first_of may be of interest: [url]http://www.cplusplus.com/reference/string/string/[/url] to get integer from a string, use atoi(strConvert.c_str()) I would imagine actually getting … | |
I have classes A1, A2, B, and C. A2 inherits from A1. C inherits from A2 and B, and its constructor initializes all B, A2, and A1 variables. As a tree, it looks like this: [CODE] C / \ B A2 | A1[/CODE] I have a function [I]Foo [/I]that takes … | |
Re: [QUOTE=Narue;861748]The error is saying that you declared the FlightManager constructor ([ICODE]FlightManager();[/ICODE]) but never defined it. You must give a body to any functions before you can call them.[/QUOTE] Try this: [CODE]#include "stdafx.h" #include <iostream> #include <fstream> #include <cstdlib> #include "Flight.cpp" using namespace std; class FlightManager { public : FlightManager() [B]{}[/B];[/CODE] … | |
I want to create a file in (drive letter):\Program Files\myprog\file.ext where (drive letter) is the drive letter where windows is installed (or the default drive). Is there an easy Windows API method to retrieve it? Thanks PS, here is what I'm currently using: [code] string mainDrive = ""; foreach (string … | |
I'm going crazy trying to figure this out. I want to have a program that detects when a user locks or unlocks the computer, and I know ISensLogon has the functionality I need (MSDN link: [url]http://msdn.microsoft.com/en-us/library/aa376860(VS.85).aspx[/url]) but I cannot seem to find ANY examples of how to work with it. … | |
I have a DataGrid bound to a DataTable. For various reasons, I don't want to allow users to sort the data, but I want to sort the data once by "Username" as well as resize the columns. I use DataTable.DefaultView.Sort = "Username" before binding it to DataGrid. If I then … | |
I'm trying to get info about users in Active Directory using C++. In particular, I'd like to retrieve the EmployeeID property, but it doesn't seem to work. I know for sure one user has a value for the EmployeeID. If I look for FullName or LastLogin, I get the values, … | |
Re: make the constructor public, don't put new because newX is not a pointer, and semicolon at the end of class declarations. Worked for me. | |
From Beej's Guide to Network Programming: [QUOTE]How can I set a custom timeout value for a TCP or UDP socket? It depends on your system. You might search the net for SO_RCVTIMEO and SO_SNDTIMEO (for use with setsockopt()) to see if your system supports such functionality. The Linux man page … | |
I can use ShellExecute to easily open a URL in a new default browser window. I'd like subsequent URLs to be opened in the same window, but ShellExecute always opens a new window/tab. I've been looking on google and msdn, but there doesn't appear to be a simple solution. Do … |
The End.