Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You are probably going to have to pay someone to write the program for you. And you will have to give him/her one of those modules to work with so that the program can be tested. Therre are many freelance web sites where you can hire a programmer.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You didn't ask how. You just asked if it could be done :) A little bit of googling would have shown you the answer here

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

My advice is to take a vacation from programming for a little while. you sound burned out and that could be disasterous for your job if you do programming there. All work and no play makes a very boring person.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

What database are you using? It should have some sort of administrator panel where you can manually enter and execute sql statements. If it has one then use it to execute the sql you are trying to create. Then when you find one that works change your vb program accordingly.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

is it possible?

yes

tux4life commented: Most to-the-point answer ever seen :D +13
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Depends on the database, you need to check with the database manager (maybe its you) to find out what format the database expects. MS-Addess wants dd-mm--yyyy format while others may want dd/mm/yyyy or yyyy/mm/dd or yyyy/dd/mm or something else. Before sending to the database I suppose you need to validate the text in DateEnd.Text is a valid date and in the correct format.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

All those unresolved externals means that you have not written the implementation code for those functions. Make sure spelling, capitalization, and parameters are correct in all the *.cpp files.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

why use that old vb.6 when you can get vb.net for free? vb.6 is old and very obsolete. No serious programmer will use it except to maintain old lagecy code.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

rmdir() does nothing if the folder contains files.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Not only are fibers invisible to the kernel but they are invisible to all other threads. Fibers can only call other fibers and fibers never exit. Here is a decent article about c++ fiber class.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

line 8 is wrong. The second parameter must be an iterator of myString. If you want to erase from pos to end of string then you don't need the second parameter at all. See this link Or for what you are doing you could also use substr() method
newString = myString.substr(0,pos-1)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I'm trying to write a simple program that detects when files are changed in a folder (for another question here). It has a standard Windows with a TextBox and a couple buttons. Upon program start it calls .NET function FileSystemWatcher then sets up four event handlers for it. What I want is for the event handlers to write something to the TextBox, but VB.NET complains that shared functions can't access instance objects. I know a work-around in c++ by setting a global pointer to the instance which can be accessed by shared functions but can't think of a work around in VB. Anyone know how to do this?

The error is on line 30 of the code posted below.

Private Sub TurnOn()
        watcher = New FileSystemWatcher()
        ' Create a new FileSystemWatcher and set its properties. 
        watcher.Path = txtFolder.Text
        ' Watch for changes in LastAccess and LastWrite times, and 
        ' the renaming of files or directories. 
        watcher.NotifyFilter = (NotifyFilters.LastAccess Or NotifyFilters.LastWrite Or NotifyFilters.FileName Or NotifyFilters.DirectoryName)
        ' watch all files.
        watcher.Filter = "*.*"

        ' Add event handlers. 
        AddHandler watcher.Changed, AddressOf OnChanged
        AddHandler watcher.Created, AddressOf OnChanged
        AddHandler watcher.Deleted, AddressOf OnChanged
        AddHandler watcher.Renamed, AddressOf OnRenamed

        ' Begin watching.
        watcher.EnableRaisingEvents = True

        ' Wait for the user to quit the program.
        'Console.WriteLine("Press 'q' to quit the sample.")
        'While Chr(Console.Read()) <> "q"c
        'End While
        'Return True
        btnOnOff.Text = "OFF"
    End Sub

    Private Shared Sub OnChanged(source As Object, e As FileSystemEventArgs)
        ' Specify what is done when a file is changed, created, or deleted.
        txtFolder.Text = …
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

http://www.daniweb.com

Or you can just type the full URL and we'll linkify it automagically

Didn't work until I prefaced it with http:// .

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I would highlight the text The Future, click the Link in the purple ribbon above the editor then enter the URL in the Link's edit box.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

There's probably an answer book for TEACHERS only.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You are only 2 years too late.

line 26: you don't need to test for eof() because getline() will do that for you.

line 29: You are giving find() an integer intead of a string or char, so find() won't work. You need to convert that integer into a string before giving it to find(), or convert the first word in the line to an integer then compare the two integers.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I think what you really need to do is let win32 tell your program when the file has changed. See this article how to get a notification if change occurs in a specified directory, and this one too. Here is an article more specific to VB.NET

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

atleast you guys don't need to see my dogstich avatar :)

Hallelujah

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

can anyone write a code in c based on the above info?

Yes, can you?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

That's a bad link

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

In that particular case, you'd overrun the "abc" array by indexing it beyond the null character at the end.

Not really. It flat won't work (compile errors) because they can't be concantinated like that.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Use an IDE that is available on both operating systems, such as Code::Blocks or QT. Actually you might want to learn both CB and QT as well as portable libraries such as wxWidgets and boost. Which you will need to learn depends on what company you work for. So I'd suggest you learn both of them.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

you need VC.net

There is no such animal. You progably mean CLR/C++. The last I knew MFC is not managed code so can't access .NET API.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Your instructor is a big fat scrooge! How far along are you in school?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Well i think u can check that link if u like and download one of your choice :)

No Dragons (sob!)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Didn't you write that program? The easiest thing to do is just set bookane == "" so that it will look like the row is deleted. If you really wrote all that program you posted then you shouldn't have a very difficult time doing that.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I was thinking of getting a tattoo until I started watching Ink Master. Ohhhh! all the pain!! No thanks.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Rows can not be deleted from arrays. The best you can do is to mark the row for deletion, one way to do that is to replace one of the structure members, such as bookname, with "", then as your program searches through the array if bookname == "" then you know that row in the array is marked for deletion. When you want to add a new record re-use the row with bookname == "". When you write out the array to a file ignore the rows that have been marked for deletion.

Another method is to move the row that is to be deleted down to the end of the array, which means you will have to shuffle all the other rows up one row to fill in the gap. You will also want to set bookname = "" so that you know it has been deleted.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

try it in a tiny program and you will find out. The best way to find out such things is to write a little program to test it yourself, you will learn a lot more that way.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I'm almost 70 and I like animated avatars -- especially the one with a cartoon guy beating his head against the desk with blood spirting all over. Another I though was funny was someone reached through the computer monitor and slapped he hell out of the user.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

use std::string's substr() method. find() returns the position of the first character in the search string.

  1. Get substring from position 0 to start of search string
  2. Get substring from end of search string to end of the original string

For example, if the line is "Now is the time", and search string is "the" then you need to get "Now is " and " time"

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

If you use std::string for the input line and the search line, then when a line is read just use std::string's find() method to see if it contains the search line text.

std::string line;
std::string search_text = "World";

// read file not shown.  When line is read, do this:
if(line.find(search_text) != string::npos)
{
    // found it
    // now do somethig with this line
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

and think "I Wrote That"

Yes, I know that feeling, which is one reason to comment the code. And welcome back :)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Post the addbook() function.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

believes that world will end before they die and have started preparing for it to survive.

If the world comes to an end then, by definition, there will be no survivors. We (USA) have a lot of nutcases mostly religious fanatics who believe the world is coming to an end -- it will but not for another few billion years.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Just in case the world does not end tomarrow (21 Dec), Merry Christmas everyone, even if you don't celebrate it.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Is MainWindow::MainDlgProc() a static method? Only static methods can be used as callback functions.

Check out this link

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

wish granted. You are killed eaten by hundry wolves.
I wish I were 20 years old again.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Large memory model programs can have at most about 640K (actually less because MS-DOS operating system consumes some of it), which is not very much. Small memory models are limited to 64K. You can check the memory size of your program with MS-Windows Task Manager. Here is a more complete explaination.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Wish granted. Everyone but you are now zombies.

deltascrow commented: epic reply +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

wish granted. Everyone but you are dead.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Here is a great tutorial, After reading some of it I got the (not free) ebook. It covers many things pretty thoroughly. If you have programmed befoe you can just skim over parts of it. But it will get you going pretty quickly on vb.net.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

what compiler are you using? I compiled the code in your first post with Microsoft's Visual Studio 2012 and did not get any errors. Is that the entire code in sendEmail.c?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Are you using Turbo C++? What version of MS-Windows are you using? The number of lines of code is not relevent. What is relevant is how much memory your program uses. Are you compiling with Large memory model? If not, try that and see if it helps.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

fgets() puts '\n' at the end only if there is room for it. If the buffer is not large enough to hold all the characters then fgets() will put however many characters it can in the buffer and leave the rest in the keyboard buffer. That makes a good way to see if the keyboard buffer is empty or not, and if not then call fgets() again to geet the remaining characters.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

delete the macro cknltz from that line.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

what is the email message??? We can't tell you wnat it is because we didn't write the program. We have no clue what the message is supposed to be. If the message is "Hello World" then char *filename = "Hello World", but that isn't reasonable. I would assume from the name of the variable that filename should point to the name of a file, such as char* filename = "c:/SomeFile.txt"

You should be asking your questions on Centos's forums at this link

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The '\0' is overwritten for the reassons I previously mention, if you want to enter 20 characters then you have to make the length of the string 21 so that there is enough room for the '\0'.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

.fgets includes the terminating null character at the end in the output,but gets doesn't

I think you are confused about the difference between fgets() and get(). fgets() puts (if there is room) the '\n' (Enter key) at the end of the string. Both fgets() and gets() att the '\0' null terminator at the end.

Just because the program didn't crash doesn't mean its "working fine". If you used gets() and entered 20 characters, where do you think gets() will save the extra characters? Answer it will probably overwrite some other variable that was declared nearby, or just scribble the extras somewhere in memory. Instead of entering 20 characters enter 50 characters (just type gibberish) and see what heppens.