Posts
 
Reputation
Joined
Last Seen
Ranked #522
Strength to Increase Rep
+5
Strength to Decrease Rep
-1
82% Quality Score
Upvotes Received
10
Posts with Upvotes
10
Upvoting Members
8
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
6 Commented Posts
2 Endorsements
Ranked #621
Ranked #914
~25.1K People Reached
About Me

There's more politics in there than the dying stuff, brother. I have already 'gave them a favor' by playing bullshit to the people who developed me to be a proud countryman. Now you wanna give me to the wolves?

Favorite Forums
Favorite Tags

47 Posted Topics

Member Avatar for mheja

Dim rs As Recordset, nextId As Long Set rs = con.Execute("SELECT Max(emp_id) As LastID FROM theTable") nextId = 1 If rs.RecordCount <> 0 Then nextId = rs!LastID End If nextId = nextId + 1

Member Avatar for MEENAU
0
636
Member Avatar for kingkong123

You declared you array wrong. > char array[5][**2**] = { "blueone", "greentwo", "redthree", "pinkfour", "yellowfive" }; This declaration says that there are 5 elements that themselves are arrays consisting 2 elements. You can declare them like this: `char (asterisk character) array[] = { "blueone", "greentwo", "redthree", "pinkfour", "yellowfive" };` NOTE: …

Member Avatar for deceptikon
0
227
Member Avatar for anjum1

You can't do that in C++. Microsoft Office Applications do not use the ordinary menu we see in other windows-based program.

Member Avatar for anjum1
0
369
Member Avatar for andrew.mendonca.967

Review the instructions to your assignment. Sometimes are error is not the coding itself but the failure to follow instructions. Like this: > ...data in the file. Your **input and output file names will be supplied to your program on the command line, which you will access using argc and …

Member Avatar for RonalBertogi
0
442
Member Avatar for dospy

First of all, I did not see any variable declared with an identifier To and From. But I suppose the main error in this class is your declaration if these variables: m_To, m_From and m_Msg. They are all pointers. And the fact that they are pointers, you should not call …

Member Avatar for RonalBertogi
0
285
Member Avatar for sal21

If your goal is to read the file line by line without the carriage return and line feed (CRLF), you can do so without allocating large amount of memory. And, I still opt the method you choose than using another object for that purpose. Dim strBuffer As String Close #1 …

Member Avatar for RonalBertogi
0
164
Member Avatar for Simon180
Member Avatar for RonalBertogi
0
947
Member Avatar for Tony.Z

First, have a cleanup of your code. You may (must) replace your code from line 40 up to line 62 with the code below. That way, it could be cleaner to read (and debug) your code and it might help us—including yourself—solve your problem. if (reply == 'y') { switch …

Member Avatar for RonalBertogi
0
409
Member Avatar for Mark Alonzo16

Previous answers are correct but I just want to post something clearer. If you are planning to use more than one database simultaneously in your program, you have to make one connection per database. But the most ideal solution here is to make links to the table of interests from …

Member Avatar for RonalBertogi
0
108
Member Avatar for efe.ozyer

OK, for the sake of answering the question, when creating your main window (with CreateWindowEx API and not with CreateWindow macro), include in the extended window style the WS_EX_TOOLWINDOW. But you'll have title bar which is awkward for a main window. If you are using a dialog box as your …

Member Avatar for RonalBertogi
0
3K
Member Avatar for atulnain007

But using random numbers in createing bank account number, I suppose, is not a good idea. There are a lot of ways you can generate a unique bank account number. One of this is using the date and time a client registered.

Member Avatar for rubberman
0
186
Member Avatar for soche123

He he he. Actually, the OP's confusion is valid. After the state `while( count++<=5)`, count's value will already be 2, thus `cout<<count*(count-2)<<" ";` will be 2*(2-2)==>2*(0)==>0. It's like the sum(A1:A5) function in excel returning different result compared to A1+A2+A3+A4+A5. If you're very much sure there's nothing to check in your …

Member Avatar for RonalBertogi
0
213
Member Avatar for Elixir42

You just declared the structure of the class, its ctor and dtor and some data members. Does your project files include a source file that will define the class?

Member Avatar for Elixir42
0
247
Member Avatar for kamalashraf

What do you want from the web site pointed to by the URL? The HTML document, objects contained in an element like *src* of the <img> element? If you are going to do that in windows, you can run an instance of the internet explorer thru its dispatch interface, feed …

Member Avatar for triumphost
0
606
Member Avatar for taogomano.wau

That's one solution to the problem--one solution because there are a lot of ways you can avoid this *warning*.

Member Avatar for RonalBertogi
0
295
Member Avatar for shubam
Member Avatar for yassink

...and to make the life of the user of your program easier, consider him wanting to type lower case F, C and Y.

Member Avatar for RonalBertogi
0
321
Member Avatar for mc3330418

mc3330418's question was that you allocated (dynamically) a Student object but missed (or failed) to deallocate them when your program exits. > Basically when you dynamically allocate an array the compiler calls the constructor for each object you want to allocate. Yes, that's true, IF, you allocated them using the …

Member Avatar for RonalBertogi
0
627
Member Avatar for c0DEZOMBIE

Calling registry functions does not cause GetLastError() to return any error codes. They are rather returned by the registry function you called. Example: DWORD Err; HKEY key; char * msg; Err = RegOpenKey(HKEY_LOCAL_MACHINE, TEXT("\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment\\hggjk"), &key); if( Err!=ERROR_SUCCESS ) { FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |FORMAT_MESSAGE_FROM_SYSTEM, NULL, 0, Err, (LPTSTR) &msg, 0, NULL); cout<<"System: …

Member Avatar for c0DEZOMBIE
0
468
Member Avatar for maHvic

template<class _T> const char * dec2bin(_T dec) { static char szret[65]; int ch = sizeof(dec) * 8; memset(szret, 0, ch+1); char * ptr = szret; for( int i=0;i<ch;i++ ) ptr[ch-1-i] = '0' + (dec >> i & 1); return ptr; } I've tried before posting this. dec2bin function accepts any …

Member Avatar for AndrisP
0
1K
Member Avatar for gobiking

...and for a cleaner coding you can cause the switch statement: *After lines #7 & #8 of Milton Neal's post:* switch( sign ) { case '+': statements; break; case '-': statements; break; case '*': statements; break; case '/': statements; break; default: cout<<"Invalid sign "<<"("<<sign<<") used."; } Replace *statements* with your …

Member Avatar for Labdabeta
0
296
Member Avatar for beginner91

You can combine `info.wShowWindow = SW_HIDE` with `info.dwFlags = STARTF_USESHOWWINDOW`. But the GUI app you are trying to run could always ignore the value of wShowWindow of STARTUPINFO structure (which is passed as `int nCmdShow` in the WinMain entry point) and show its own window the way it wants (the …

Member Avatar for Ancient Dragon
0
491
Member Avatar for johans22

Why this program crashes not because of *typedef* but because of using an uninitialized variable. Look at your code at line #6: You declared `static test *p` and, without allocating it, used in your `int main()` function. On your second post, `static test p` should work of course because variable …

Member Avatar for RonalBertogi
0
170
Member Avatar for RonalBertogi

Observe this code: TOOLBARINFO tbi = { 0 }; BUTTONINFO bi, *xBI; tbi.pTOI = pTOI; int x = 0, xSearchBox = 0, s = 0; BYTE xType = btNone; BOOL bAdd; for( ;*pszInfo; ) { bAdd = TRUE; memset(&bi, 0, sizeof bi); switch( *pszInfo ) { case bfButton: s++; bi.L …

Member Avatar for RonalBertogi
0
198
Member Avatar for nova37

if you just want to check if your process is still alive or dead using the process id (pid) you have, calling the OpenProcess API would suffice.

Member Avatar for nova37
0
901
Member Avatar for MasterHacker110

But, in continuation to deceptikon's reply, if you just want to be able to call ShellExecute while enabling you to pass your sProgramName variable as an argument, you can use its ANSI version without much hassles, e. g. ShellExecuteA(NULL, NULL, &sProgramName[0], NULL, NULL, SW_SHOW);

Member Avatar for MasterHacker110
0
4K
Member Avatar for tomz6
Member Avatar for RonalBertogi
0
255
Member Avatar for dreday92

As your class declaration says, **buildFromInputString** is part of its structure. But when you defined the functions of your class, particularly buildFromInputString function, I think you simply missed to type something. Look at what you've typed in line 114: template<typename T> void buildFromInputString(const string input) { istringstream iss(input); while(iss) { …

Member Avatar for RonalBertogi
0
283
Member Avatar for Melly3
Member Avatar for Echo89

Hello echo, I wrote here some notes I hope could help you decrypt your problem. 1. If you want to create a subclassed button where you want to do the painting yourself through the new WNDPROC address you have given, you do not need to create an owner-drawn button. 2. …

Member Avatar for Echo89
0
1K
Member Avatar for ralph.d.abernathy.1

Well, I think there's no way to **directly** convert hex to octal because a hex value needs to be parsed first to get its value in real numbers (decimal). But the process is always the same: to convert decimal to another notation (hex, octal) you divide the number with your …

Member Avatar for Nutster
0
503
Member Avatar for sgw

You can use unsigned long long or you can create a class that can handle infinite numerical value (although may not be worth in some particular case).

Member Avatar for asifalizaman
0
256
Member Avatar for daniel1977

All posts above are sufficient answers. I just want to add a little additional info regarding the `protected` statement: Data/properties and methods of a class declared as protected is only accessible to the class and its inheritors.

Member Avatar for RonalBertogi
0
248
Member Avatar for Superfreak3

If you are targetting Windows platform, using a mutex, as suggested by triumphost, is, as my personal experience, the best way to do this. I have here a little sample here: UINT g_uSyncMsg; int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int) { g_uSyncMsg = RegisterWindowMessage("any msg string you prefer"); HANDLE hMutex …

Member Avatar for RonalBertogi
0
220
Member Avatar for letterG

Let's examine the code in your binarySearchTree::insert() function line by line: ` treeNode *temp;` ` treeNode *add;` here you allocated memory for you local add variable and set its item property to the value of x add = new treeNode; add->item=x; temp=root; if(temp==NULL) this line here will be executed the …

Member Avatar for letterG
0
163
Member Avatar for bhemlhie

What do you mean *connect*? Run an exe from a web site or use an exe as a server side app?

Member Avatar for sara93
2
578
Member Avatar for NewUser22

Looks like you have already done some sort of exercises. Perhaps all you need to do first is to review those exercises you underwent. E. g. what is a struct and how to declare a struct? How to declare variables and assign value to them? etc. etc. Do them first …

Member Avatar for Ancient Dragon
0
303
Member Avatar for Bile

Create your form with all the menus you need, save it (with the name that will help you identify it's contents) and copy it to the *forms templates folder* of visual basic. About this folder, :( I can no longer remember where exactly it is. Haven't been using vb6 for …

Member Avatar for AndreRet
0
226
Member Avatar for meLiel

Hello, meLiel! I'll give you an example how to check whether a record exists in database or not. This is best and easily done if your database records has a field that contains a unique key or id. On your sample code, I will just assume that **txtEnterID.Text** holds the …

Member Avatar for hyesin
0
168
Member Avatar for fishsticks1907

What kind of error are you receiving, run-time or compile time? May I know the IDE you are using and its version?

Member Avatar for fishsticks1907
0
165
Member Avatar for anukavi

If you really have typed line 3 (in reference to nullptr's post) that way, it is sure to generate a compile-time error `cannot convert parameter 1 from 'char' to 'void *'`. But if you have typed it like line 2, I'm pretty sure you will get a 14.

Member Avatar for anukavi
0
263
Member Avatar for Major Aly

@histrungalot Your code is fine and it sure will solve Major Aly's problem. But your code has limitations and can initiate memory leak errors since your **AVGPCT* CALC(student *A)** function assumes that *A* is an array of five. What if student is a pointer to an array of less than …

Member Avatar for histrungalot
0
363
Member Avatar for knight92

You can use these GDI API functions: *GetObject GetDIBits* They are faster than GetPixel but entails more work than the latter.

Member Avatar for BobS0327
0
730
Member Avatar for vegaseat

include winmm.lib in your project imports or do the `pragma: #pragma comment(lib, "winmm.lib")` BTW, here is my own version. Additional to this is you can lock/unlock the drive. // dischander.h #pragma once struct DiscHandler { // I assume these routines are self-explanatory static BOOL Eject(BYTE bDrive); static BOOL Load(BYTE bDrive); …

Member Avatar for RonalBertogi
1
652
Member Avatar for FearlessHornet
Member Avatar for PinoyDev

Here's mine for your number validation Function Validate_Number(ByRef PassNumber As String) As Boolean Static szValidNum As String If szValidNum = "" Then _ szValidNum = "0123456789" Dim szNum As String Dim c As String * 1, i As Integer, ch As Integer Dim dots As Integer, pluses As Integer, minuses …

Member Avatar for RonalBertogi
0
356
Member Avatar for meLiel

The code below assumes that you have already established your database connection. To delete a particular record the code is: con.Execute "DELETE FROM <<tablename>> WHERE <<fieldFilter>>='discardable'" NOTES: 1. fieldFilter is the name of field in the table where you are to delete records. 2. fieldFilter can take different systax. It …

Member Avatar for RonalBertogi
0
545

The End.