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

Have you scanned your computer for malware and viruses?

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

I doubt school network administrators are stupid enough to leave their networks wide open for students to screw up. If you get access denied it's because network admins aren't dumb enough to let you do what you are attempting to do.

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

The error is not related to the compiler. When you try to execute the program the operating system is looking for that DLL and can't find it. The DLL must be in one of the folders that is in the PATH environment variable or in the same folder as the *.exe that you are attempting to run.

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

what operating system? For MS-Windows use these communications functions, or if you bought a multi-serial port card then it should have a device driver for it that you should use.

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

your program already reads the file -- just to the opposite of that loop starting at line 319.

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

Are you supposed to do this in C++ or C? The code you posted is C, but you posted in c++ forum.

I'm not going to write your whole program for you, but this is how to read one line at a time. If the column you want is always the last word in the line then you could call strrchr() to find the last space. Otherwise if the may be more columns in the line you will need to find the first 7 spaces in a loop.

char line[80];
while( fgets(line,sizeof(line),fin) != NULL)
{
   // now get pointer to the 7th word in line and convert it to integer

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

typecast it

svdcmp((double**)b, 2, 2, NULL, NULL);

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

first of all he is creating the nodes incorrectly.

Not if he want to add the new nodes at the head of the linked list. Yours is correct if you want to add the new node to the tail of the list. There is a difference.

Now all he has to do is traverse the linked list to the last node through a simple loop and keep printing the elements and when he reaches the last node he should delete temp...problem solved

Yes, I agree, he is deleting the wrong node in the print() function, no need to keep track of the previous node.

i'm trying to delete last node of linked list and print the remaining list at each step.

So, each time you advance the next pointer you have to print the value of all remaining nodes? To do that you will need a second loop inside the main loop

temp = head;
whle(temp->next != 0)
{
    node* temp1 = temp;
    while(temp1->next != 0)
    {
       cout << temp1->data << ' ';
       temp1 = temp1-> next;
    }
    cout << '\n';
    temp = temp->next;
}
// now delete temp
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

why are you reading the file one character at a time? It would be a lot easier to read the entire line with fgets() then extract the number from the column you want.

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

I don't think that is the problem -- he is inserting the new node at the head of the linked list not at the list's tail, and to do that you have to make the new node the head of the list and point the next pointer to the previous head node like he did.

In my original code its reverse but here i used print.... so.......

Why the recursion?

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

Might not fix the problem, but the two loops in lines 11-17 can be combined into just one loop. Why iterate through the linked list twice when once will do? And what is Reverse() supposed to do?

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

It restarts the device but the problem still persists.

Might be a hardware problem. Do you have another mouse you can try? Is it a USB mouse? Try plugging it into another USB port to see if it's a bad USB port.

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

It was also used in the 1980s/1990s with MS-DOS 6.X and earlier to write directly to the screen, or to write directly to a port such as serial and parallel ports. Ahh, those were the good old days when Turbo C was king of the compilers.

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

why did you post that???

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

The White House has Fallen -- good acting but just a copycat plot of Olympis Is Down -- both about the White House getting blown up.

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

line 13 should be cin>>newlink->link->data->account_number; Compare that with the other errors you posted and you will see what's wrong with them.

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

fwrite() writes out the data in binary form, the same as it's represented in memory, so the integers will not be readable.

The printf() statements in viewbooks() you posted do not put any spaces between the fields, so it will all look run together on the screen.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
 book.cat=catagories[choice-1];
        fseek(fp,0,SEEK_END);
        fwrite(&book,sizeof(book),1,fp);

As I said before, the above won't work because all that is getting written to the file is the address of cagegories[chilce-1], not the string. An easier way to do it is to save the value of choice instead of the string, then the structure cat would be a simple integer instead of a pointer.

 struct BOOK;
    {
        int id[10];
        char name[20];
        char Author[20];
        int quantity;
        float Price;
        int rackno;
        int cat; // <<<<<<<<<<<<<<<<<<

    }

Now, when you want to print the string just printcategories[book.cat-1]

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

The blue background works correctly in the code you posted here.

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

char *cat;

It's a pointer, not an array. If it were an array it would look something like this: char cat[80];

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

The shift is not necessary, should be able to just or the forground and background colors together as you have done without the shift. As for your question, did you try it to see if it works?

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

You are not supposed to move the entire function into the header file -- just put the function prototype in the header file, leave the actual function in the *.c file.

Why do you have the structure inside the function? Is no other function in your program using it?

Structures that contain pointers can not be easily written or fread from data files because only the address contained in the pointer is read/written, not the string or other object to which it points. Look at the contents of the data file with Notepad or some other text editor and you will see the problem. It would simplify the problem if you change 'cat' to a character array instead of a pointer, similar to the way name and Author are declared.

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

Why would I, an unmarried man who is as old as the hills need maternity care? I'm exempt from Obamacare because I already have Medicare and TriCare For Life (US military medical care) which are covered under different laws. But if I didn't have those then I certainly wouldn't need maturnity care, unless of course someone is planning to get men pregnant :)

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

I don't understand -- what does line 19 have to do with username? At line 19 the contents of query already contains the user name.

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

No -- to call a function all you do is use the names of the variables, you do not include the data type like you do in the function prototypes. See how you did it in line 37

OpenInputFile(inFile,infilename);

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

Sounds like something a 12-year-old might post.

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

line 39 is a function prototype, not an actual call to the function. You could just as easily move line 39 to line 27 with all the other function prototypes.

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

Functions must be declared before they can be used (function prototypes) -- did you declare viewbooks() in a header file or near the beginning of the file in which it is called?

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

After seeing this thread yesterday I started watching a thread, today I got an email that some posts had been made to it.

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

(and free to use for students)

the Express version is free for everyone. Code::Blocks with MinGW compiler is also an excellent free compiler, it's also portable between MS-Windows and Linux. There might be a version for MAC, but I don't know about that.

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

The same way you would write any character array. If you don't know how to do that either here is a tutorial to help you out.

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

Here is the actual 32-bit disk image

d258e5a5e2c0dc0fe1ba01ab4e4b36c0

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

They do not both work the same. calloc() initialized the memory block with all 0's while malloc() does not. And they do not have the same parameters.

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

You'd have to redeclare the function even if you could overload ::, so what's the problem?

class test
{
   public:
       virtual void Created() {cout << "Hello from test class\n";}
       test()
       {
           Created();
       }
};

class Child : public text
{
public:

   virtual void Created() {cout << "Hello from Child\n";}
 };

 int main()
 {
     Child c;
     c.Created();  // call Created in Child class
     c.test::Created(); // call Created in test class
 }
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

As you can see, you'd have to be blind not to have known which version you were installing. Even the disk itself is labeled clearly with either 32 or 64. And people who don't know what those numbers mean have absolutely no business installing the os by themselves.

ac5e54952504db9f543745b48dbf4fad >how prominent is any writing on the disk and/or its packaging

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

You might as SOMEBODY why he/she gave you the 32-bit version instead of the 64-bit version. Maybe it was company policy -- or SOMEBODY bought multiple licenses for only 32-bit version. Could be a lot of reasons for doing that.

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

Spagetti & meatsauce made by Dierberg's grocery store.

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

No, it's not zipped -- the extension is xml. By "gibberish" I mean it's all readable but makes little or no sense to someone not versed in xml format.

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

I just received FIVE emails from DaniWeb, all of them are identical. Why??

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

I have an XML file I downloaded that is supposed to be API documentation for a program I downloaded. The problem is that I haven't the slightest idea how to read the file. I tried using Notepad, Google and IE, they all just show a lot of gibberish. What program can I use that formats it into human readible text?

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

Used computers regardless of age aren't work very much, mainly because brand new computers are to cheap. Since it's fairly new you could just buy a new motherboard if you just want an 8-core computer.

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

The Windows 8.0 CD package I have has both disks in it (full version, not upgrade). If you want 64-bit then I think you will have to completly reinstall the os. You can't upgrade from 32 to 64 bit without total reinstallation.

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

The way to check it is to run it and see if it does what it's supposed to do. If it doesn't then the program is wrong. From the code you posted I believe you have just scratched the surface of what the assignment requires.

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

You can't do all that in one loop. In the first loop, print 5 spaces then 5 stars. Then in a second loop print 15 stars. The third loop is the same as the first loop. This is assuming you are required to use loops to print the characters one at a time. You could do the whole thing without any loops at all, but that would defeat the purpose of the assignment.

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

Cool :)

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

I upgraded from 8.0 to 8.1 yesterday. Everything went without a hitch, until I tried to access the internet. My computer is wifi and the upgrade lot all network connection settings as well as it deleted antivirus program. I had to reinstall Linksys wifi driver and reconnect to the wifi router. I tried to connect to my homegroup network, but it failed most likely because of some obscure security setting on the computer.

I didn't have the problem that frank33 reported. Are you sure you installed the 64-bit version from the CD? On my computer, control panel --> System program says it's still 64-bit os after the upgrade.

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

remove the typecast -- it's not needed.

Since Text is std::string, why are you calling strlen() instead of using Text.Length()??? Line 5 is completely unnessary, just extra usless baggaged. Line 6 can be rewritten SHORT stringlen=Text.Length();, and you really don't need that either. Just use Text.Length() wherever you have stringlen.

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

This works

#include <Windows.h>
#include <iostream>
#pragma warning(disable: 4996)

int main()
{
    HANDLE hout=GetStdHandle(STD_OUTPUT_HANDLE);
    char text[]="Hello World";
    CHAR_INFO *consoletext= new CHAR_INFO[sizeof(text)-1];
    COORD a={sizeof(text)-1,1}, b={0,0};
    SMALL_RECT c={0,0,80,24};

    int i=0;
    for (i=0; i<sizeof(text)-1;i++)
    {
        consoletext[i].Char.AsciiChar  =text[i];
        consoletext[i].Attributes=FOREGROUND_RED|BACKGROUND_RED;
    }

    int success = WriteConsoleOutput(hout,consoletext,a,b,&c);
    if( !success )
    {
        std::cout << "WriteConsoleOutput failed\n";
    }
    delete[] consoletext;
    std::cin.get();
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Did you correct lines 11 and 12?

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

Well, yes. You can't compare something before you know what to compare it with.