Hopefully my code tagging isn't to bad.
I'm in a "C" program class and for lab we had to create
a phonebook over a course of several weeks.
In this lab we had to make the phonebook so that the user
could chose where to save their phonebook list and name it
whatever they choose.
Naming of the phonebook works. The issue I am having and just can't
resolve no matter what I have tried (6 hours since wee hours this morning)
is I can't get the program to save the phonebook.dat file to the directory
entered in at the command prompt. I have used the printf function throughout
the lines of code and when looking at the vaiables for the path and name
they all look correct (path: example - C:\1\User\phonebook.dat). But yet
the program ignores the input and creates the phonebook.dat file in the
directory were the program is executing from. If I manually put in the
path (C:\1\user\phonebook) in the code itself it works though you have
to enter the path as "c:\\1\\user\\phonebook.dat). I have also tried
using two '\\' when typing in the lcoation when prompted and it still
doesn't work. I've searched the internet and tried/looked at everything
I have found but have not come across a resolution.
I the code submitted I have offset the sections of code with
// ***** Beginning ..... ***** and
/ ***** End .... *********
I'm using the "Delete a contact section" for testing. the only
part of the program that doesn't work is the 'Delete a contact"
and "Sorting" and they both center around this issue.
I'm sure (hopefully) there is only a minor issue with this code.
I'm using Dev-C/C++ from Bloodshed.net (College Professor recommended)
version 4.9.9.2 on Windows XP with the latest servcie packs and have tried
3 different conmputers.
Any recomendations as to what I am missing or doing wrong would be
extremely appreciated.
Thanks in advance for any help provided.
Russell