Linked list- error problem.... HELP!!!

Just got to the point that i'm better at drinking java than programing java....
how ever... I have done person register with Linked list. There are like 4 options:
1. New post
2. search
3. search and change
4. remove post
U can enter your name, adress and personal code number while making a new post, but when I've removed it ( l.list.remove(p);)and then search for it I get the error message "Exception in thread "main"....bla bla..". Why? and how do I get around this prob? PLEASE HELP ME!! gotta hand this in tonight!
Thank U!!
//Phil

Phil,
LinkedList itself works as advertised (1.3.1). For example:
LL = LinkedList()
LL.add("apple")
LL.add("battle")
LL.add("cattle")
// printing LL yields all 3
LL.remove("battle")
// printing LL yields apple, cattle
You may need to post for responders to get a better idea. If posting code please enclose in  blocks so it's formatted properly.
--A                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Cannot copy necessary linked file ERROR.  HELP ME!! I can't make a package

    Cannot copy necessary linked file ERROR.  HELP ME!! I can't make a package

    What have you tried? Often, this happens when a linked file is open...perhaps at the hands of another user across a network where you can't see. If that's not the case, and you're sure you don't have it open, it's still possible your system just thinks it's open. Reboot the computer and try again.

  • Linked List bubbleSort problems

    I'm trying to implement a bubbleSort (with a insertionSort and selectionSort) on a linked list, but can't seem to get it working. Any tips on correcting the bubbleSort, and maybe some for the other two? Thanks!!!
    public class sortingMethods {
    public sortingMethods() {}
    public void bubbleSort(LinkedList list) {
    if(list.isEmpty())
    System.out.println("List is currently empty.");
    else if (list.size() == 1)
    System.out.println("List is already sorted.");
    else {
    Node current = list.getHead();
    Node next = current.getNext();
    Node temp;
    int counter = 0;
    boolean exchangeMade = true;
    while(counter < (list.size() - 1) && exchangeMade) {
    counter++;
    exchangeMade = false;
    for(int i = 1; i <= (list.size() - counter); i++) {
    if(current.getData() > next.getData()) {
    temp = current;
    current = next;
    next = temp;
    exchangeMade = true;
    public void selectionSort(LinkedList list) {
    if(list.isEmpty())
    System.out.println("List is currently empty.");
    else if (list.size() == 1)
    System.out.println("List is already sorted.");
    else{}
    public void insertionSort(LinkedList list){
    if(list.isEmpty())
    System.out.println("List is currently empty.");
    else if (list.size() == 1)
    System.out.println("List is already sorted.");
    else {
    public class LinkedList {
    private Node head;
    private int count;
    public LinkedList() {
    head = null;
    count = 0;
    public LinkedList(LinkedList rhs) {   //Copy constructor
    head = rhs.head;
    count = rhs.count;
    public void orderedInsert(int item) {   //Inserts the Node in the right position - Ascending
    Node back = null;
    Node newNode = new Node(item);
    Node pointer = head;
    boolean found = false;
    while(pointer != null && !found) {
    if(pointer.getData() > item)
    found = true;
    else {
    back = pointer;
    pointer = pointer.getNext();
    newNode.setNext(pointer);
    if(back == null) {
    head = newNode;
    count++;
    else {
    back.setNext(newNode);
    count++;
    public void insert(int item) {   //Inserts at front of list
    Node newnode = new Node(item);
    if(head == null)
    head = newnode;
    else {
    newnode.setNext(head);
    head = newnode;
    public void orderedRemove(int item) {   //Searches and removes selected Node
    Node back = null;
    boolean found = false;
    Node pointer = head;
    while(pointer != null && !found) {
    if(pointer.getData() == item)
    found = true;
    else {
    back = pointer;
    pointer = pointer.getNext();
    if(found)
    if(back == null) {
    head = pointer.getNext();
    count--;
    } else {
    back.setNext(pointer.getNext());
    count--;
    } else
    System.out.println("Data not found in list.");
    public void remove() {   //Removes from front of list
    if(head == null)
    System.out.println("List is currently empty.");
    else {
    Node n = head;
    head = head.getNext();
    n.setNext(null);
    count--;
    public boolean isEmpty() {
    if(head == null)
    return true;
    else
    return false;
    public void print() {
    Node current = head;
    while(current != null) {
    System.out.println(current.getData());
    current = current.getNext();
    public int size() {return count;}
    public Node getHead() {return head;}
    } //End LinkedList class

    I'm still having problems! Now the code just seems to go through an endless loop.
        public void bubbleSort(LinkedList list) {
            if(list.isEmpty())
                System.out.println("List is currently empty.");
            else if (list.size() == 1)
                System.out.println("List is already sorted.");
            else {
                boolean exchangeMade = true;           
                int counter = 0;
                Node current = list.getHead();
                Node next = current.getNext();
                Node temp;
                while(counter < (list.size() - 1) && exchangeMade) {
                    counter++;
                    exchangeMade = false;
                    for(int i = 1; i <= (list.size() - counter); i++) {
                        if(current.getData() > next.getData()) {
                            temp = current;
                            current.setNext(next);
                            next.setNext(temp);
                            exchangeMade = true;
        }And here is the rest of my code...
    package cs321_assignment1;
    public class LinkedList {   //Doubly Linked List
        private Node head;
        private int count;
        public LinkedList() {
            head = null;
            count = 0;
        public LinkedList(LinkedList rhs) {   //Copy constructor
            head = rhs.head;
            count = rhs.count;
        public void orderedInsert(int item) {   //Inserts the Node in the right position - Ascending
            Node back = null;
            Node newNode = new Node(item);
            Node pointer = head;
            boolean found = false;
            while(pointer != null && !found) {
                if(pointer.getData() > item)
                    found = true;
                else {
                    back = pointer;
                    pointer = pointer.getNext();
            newNode.setNext(pointer);
            if(back == null) {
                head = newNode;
                count++;
            else {
                back.setNext(newNode);
                count++;
        public void insert(int item) {   //Inserts at front of list
            Node newnode = new Node(item);
            if(head == null)
                head = newnode;
            else {
                newnode.setNext(head);
                head = newnode;
            count++;
        public void orderedRemove(int item) {   //Searches and removes selected Node
            Node back = null;
            boolean found = false;
            Node pointer = head;
            while(pointer != null && !found) {
                if(pointer.getData() == item)
                    found = true;
                else {
                    back = pointer;
                    pointer = pointer.getNext();
            if(found)
                if(back == null) {
                head = pointer.getNext();
                count--;
                } else {
                back.setNext(pointer.getNext());
                count--;
                } else
                    System.out.println("Data not found in list.");
        public void remove() {   //Removes from front of list
            if(head == null)
                System.out.println("List is currently empty.");
            else {
                Node n = head;
                head = head.getNext();
                n.setNext(null);
                count--;
        public boolean isEmpty() {
            if(count == 0)
                return true;
            else
                return false;
        public void print() {
            Node current = head;
            while(current != null) {
                System.out.println(current.getData());
                current = current.getNext();
        public int size() {return count;}
        public Node getHead() {return head;}
        public void setHead(Node n) {head = n;}
    } //End LinkedList class
    package cs321_assignment1;
    public class Node {
        private int data;
        private Node next;
        public Node() {next = null;}
        public Node(int d) {
            next = null;
            data = d;
        public int getData() {return data;}
        public void setData(int newData) {data = newData;}
        public Node getNext() {return next;}
        public void setNext(Node newNode) {next = newNode;}
    }I can't figure this out, and I really need some help. Hopefully after I solve this, the selection and insertion sorts will be a little simpler. Any help will really be appreciated.

  • Linked List error [SOLVED]

    I have written linked lists many times, but I'm stumped by this error.
    header
    #include <stdio.h>
    typedef struct
    char *str;
    struct strstack *next;
    } strstack;
    void connect(struct strstack *a, struct strstack *b);
    source
    #include <stdio.h>
    #include "strstack.h"
    void connect(struct strstack *a, struct strstack *b)
    a->next = b;
    errors
    gcc -g -O2 --std=c99 -c strstack.c
    strstack.c: In function 'connect':
    strstack.c:7: error: dereferencing pointer to incomplete type
    make: *** [strstack] Error 1
    Does anybody have any idea what causes this?
    Last edited by Lexion (2009-09-12 23:48:49)

    Yes.
    Your typedef is silly.
    Replace with
    typedef struct stack_s
    char *str;
    struct stack_s *next;
    } stack_t;
    or similar.
    You have to name the struct, and use the struct name when declaring the next pointer. You can typedef it too, if you want to, but that name can't be used in the struct declaration.

  • Linked List  - deleeting nodes - HELP!

    How do I delete all occurences of the nodes with the same parameters in the linked list ?
    example:
    Node1-> Node2 ->Node3->Node4->Node5
    Node1, Node4, and Node5 have the same String value, how do I delete them in one method without breaking the linked list ?
    thanks

    Hi,
    You have iterate thru the linked list remove one by one. Also have look at other collection classes like HashSet or HashMap for fast retrieval.

  • Baffling linked list error in C program

    I've been working at porting some programs over to a Mac that were built using MS C 6.0.  One of the programs uses a linked list to hold some data.  Just couldn't get it to work.  So I decided to run a really simple test.  Create a short linked list and then print out the list.
    The code is below and the output is below that.  It looks like all the nodes get created properly and pointers assigned correctly but when I print out the list it crashes after the second node everytime.  It appears that in node 2 the link to the next node has been corrupted but I can't see anywhere that happens.  Is this not the way xcode does linked lists?
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <math.h>
    struct linklist {
        int node_number;
        char node_name[10];
        struct linklist * next;
    struct linklist * makenode();
    int main(int argc, const char * argv[])
        struct linklist * list_head;
        struct linklist * list_item;
        int i;
        // insert code here...
        printf("Hello, World!\n");
        list_head = makenode();
        list_head->node_number = 1;
        strcpy(list_head->node_name, "node 1");
        list_head->next = NULL;
        list_item = list_head;
        printf("head-> %0lx, item-> %0lx \n", (unsigned long) list_head, (unsigned long) list_item);
        for (i = 1; i < 10; i++)
            list_item->next = makenode();
            printf("New Node %d at %lu\n", i+1, (unsigned long) list_item->next);
            list_item = list_item->next;
            list_item->node_number = i+1;
            sprintf(list_item->node_name, "node %d", i+1);
            list_item->next = NULL;
            printf("list_item points at %lu\n", (unsigned long) list_item);
        list_item = list_head;
        for (i = 0; i < 10; i++)
            printf("list_item -> %lu>\n", (unsigned long) list_item);
            printf("%d - %s>\n", list_item->node_number, list_item->node_name);
            list_item = list_item->next;
        return 0;
    struct linklist * makenode()
        return (struct linklist *) (malloc( sizeof(struct linklist())));
    Output>>>>>
    Hello, World!
    head-> 7fdf604000e0, item-> 7fdf604000e0
    New Node 2 at 140597369256496
    list_item points at 140597369256496
    New Node 3 at 140597369256512
    list_item points at 140597369256512
    New Node 4 at 140597369256528
    list_item points at 140597369256528
    New Node 5 at 140597369256544
    list_item points at 140597369256544
    New Node 6 at 140597369256560
    list_item points at 140597369256560
    New Node 7 at 140597369256576
    list_item points at 140597369256576
    New Node 8 at 140597369256592
    list_item points at 140597369256592
    New Node 9 at 140597369256608
    list_item points at 140597369256608
    New Node 10 at 140597369256624
    list_item points at 140597369256624
    list_item -> 140597369241824>
    1 - node 1>
    list_item -> 140597369256496>
    2 - node 2>
    list_item -> 7306087013738872835>

    Change
    return (struct linklist *) (malloc( sizeof(struct linklist())));
    to
        return (struct linklist *) (malloc( sizeof(struct linklist)));
    Hello, World!
    head-> 100103b10, item-> 100103b10
    New Node 2 at 4296031024
    list_item points at 4296031024
    New Node 3 at 4296031056
    list_item points at 4296031056
    New Node 4 at 4296031088
    list_item points at 4296031088
    New Node 5 at 4296031120
    list_item points at 4296031120
    New Node 6 at 4296031152
    list_item points at 4296031152
    New Node 7 at 4296031184
    list_item points at 4296031184
    New Node 8 at 4296031216
    list_item points at 4296031216
    New Node 9 at 4296031248
    list_item points at 4296031248
    New Node 10 at 4296031280
    list_item points at 4296031280
    list_item -> 4296030992>
    1 - node 1>
    list_item -> 4296031024>
    2 - node 2>
    list_item -> 4296031056>
    3 - node 3>
    list_item -> 4296031088>
    4 - node 4>
    list_item -> 4296031120>
    5 - node 5>
    list_item -> 4296031152>
    6 - node 6>
    list_item -> 4296031184>
    7 - node 7>
    list_item -> 4296031216>
    8 - node 8>
    list_item -> 4296031248>
    9 - node 9>
    list_item -> 4296031280>
    10 - node 10>
    Program ended with exit code: 0

  • Message 3506-9 Price List Error - Please Help

    Thank you in advance for your help - here is my question:
    I am attempt to make a new price list using the following under Modules:
    Inventory --> Price Lists --> Price Lists
    When on the Price Lists Form, I right click on the last row and click on "Add Row".  I then add my new price list name, my Base Price List (same as the price list name), my factor (1), and my Rounding Method (no Rounding).  I am also using the "Update Entire Price List" option so I go ahead and click on "Update".
    Unfortunately, the next screen I receive is labeled as "Price Lists" and shows an error message as follows:
    "Variation between number of price lists and number of price lists for items [Message 3506-9]"
    I have checked the number of Distinct Price Lists in ITM1 and there are four. My current number of Price Lists in OPLN is four.  I do not understand what is causing this message and why it is preventing me from adding another price list.  Thank you for your advice on what this message means and if there are any solutions.
    Here is my SAP version information:
    SAP Business One 2007 A (8.00.177) SP:00 PL:38

    Hi Jeff Olmstead,
    We have investigated on the issue.
    This error message is related to price lists. Have you recently imported
    price lists or items into Business One?
    The problem is that the number of records in OITM does not match the
    number of records in ITM1. For every record in OITM
    there must be records in ITM1 according the number of price list in B1
    E.G. if I have 20 items and 10 price list I should have 200 records in
    ITM1. This situation can happen during import data from external
    application and not directly from B1.
    Please run the following queries to locate the problem:
    This will give you the number of items in your system:
    SELECT Count(T0.ItemCode) FROM OITM T0
    This will give you the number of price list in your system:
    SELECT Count (T0.ListNum) FROM OPLN T0
    Multiply the result of the two queries.
    This should match with the result of the following query:
    SELECT Count(T0.ItemCode) FROM ITM1 T0
    If this does not match this means that not all items are linked to all
    price lists, which in turn will not allow you to create or update
    an existing price list.
    There are 3 diffarent scenarios that can caouse this problem -
    1. Items exist in OITM and does not Exist in ITM1:
    To locate these items please execute the following query to find the
    items that are not linked.                                                              
           SELECT T0.ItemCode as 'OITM', T1.ItemCode as 'ITM1'
           FROM OITM T0
           LEFT OUTER JOIN ITM1 T1 ON T0.ItemCode = T1.ItemCode
           WHERE T1.ItemCode is NULL
    If you enter a price into the master data the link will be created. You
    can also enter the price in the pricelist.
    2. Items exist in ITM1 and does not Exist in OITM:
    To locate these items please execute the following query to find the
    items that are not linked.
           SELECT T1.ItemCode as 'OITM',  T0.ItemCode as 'ITM1'
           FROM ITM1 T0
           Left JOIN OITM T1 ON T0.ItemCode = T1.ItemCode
           Where T1.ItemCode is NULL
    3. Items do not Exist in in all price lists (Records are missing in
    ITM1):
    To locate these items please execute the following query to find the
    items and price lists missing from ITM1.
          select itm1.itemcode,
               itm1.pricelist,
               a.listnum,
               a.itemcode,
               oitm.createdate
          from   itm1 right join
                (select itemcode, listnum from oitm, opln) as a
               on itm1.itemcode+ convert(nvarchar, itm1.pricelist) =
    a.itemcode+ convert(nvarchar, a.listnum )
               inner join oitm on a.itemcode  = oitm.itemcode
                 where  itm1.itemcode is null
                 order by 5,1, 4,3
    If the query retrieves any results, please contact your Support Center.
    Hope this helps.
    Best Regards,
    Summer Ding
    SAP Business One Forums Team

  • Linked excel file problem - Help needed

    I have 2 excel files in the same directory in Content Services. The "destination" file has a link in one of its cells to a cell in the "source" file. I want to be able to open the "destination" file and update the data if any changes have been made to the "source" file.
    My problem is when I try to do this i get an error that says "This workbook contains one or more links that cannot be updated" and two options.
    1) To change the source of links, or attempt to update values again, click Edit Links.
    2) To open the workbook as is, click Continue.
    If I click Edit Links I am then presented with a screen where I can open the "source" file. When I try to do this though I am given a login screen. Supplying a valid Content Services username and password doesn't work and I cannot open the file.
    Can anyone tell me how I can open the "destination" file without having to open every "source" file? I don't want to open the "source" files because there could be dozens of "source" files for one "destination" file.

    setw is the equivalent of the field width value in printf. In your code, the printf version would look like:
    printf("%8s", CURSOR->name.c_str());
    I much prefer printf over any I/O formatting in C++. See the printf man page for more information. I recommend using Bwana: http://www.bruji.com/bwana/
    I do think it is a good idea to verify your code on the platform it will be tested against. That means Visual Studio. However, you don't want to use Visual Studio. As you have found out, it gets people into too many bad habits. Linux is much the same way. Both development platforms are designed to build anything, whether or not it is syntactically correct. Both GNU and Microsoft have a long history of changing the language standards just to suit themselves.
    I don't know what level you are in the class, but I have a few tips for you. I'll phrase them so that they answers are a good exercise for the student
    * Look into const-correctness.
    * You don't need to compare a bool to 1. You can just use bool. Plus, any integer or pointer type has an implicit cast to bool.
    * Don't reuse your CURSOR pointer as a temporary index. Create a new pointer inside the for loop.
    * In C++, a struct is the same thing as a class, with all of its members public by default. You can create constructors and member functions in a struct.
    * Optimize your function arguments. Pass by const reference instead of by copy. You will need to use pass by copy at a later date, but don't worry about that now.
    * Look into initializer lists.
    * In C++ NULL and 0 are always the same.
    * Return the result of an expression instead of true or false. Technically this isn't officially Return Value Optimization, but it is a good habit.
    Of course, get it running first, then make it fancy.

  • Facetime Error Problem Help?

    I had my ipod restored and so when it restored i tried to put in my apple pass so i can activate my facetime and this is what it keeps saying to me. My inteernet works so i don`t understand why it is not working. How can I activate my facetime?

    I have the same issue too i tried going through support online providing them my serial number for my itouch and it was telling me that my itouch doesnt have any insurance and what not... i have been using facetime for months and the problem just occured last night... couldnt use my facetime or imessage... tried changing password and it still shows the same error...
    FACETIME ACTIVATION
    An error occured during activation. Try again.
    My Wifi works perfect and i could surf safari with no problem.
    HELP PLEASE!!

  • 845e max error problems help!

    Ok i have a computer with this board in it. and i have been getting a bunch of different errors the newest one is a big blue screen that comes up and says :
    Problem has been detected and windows has shut down to prevent damage to your computer
    it says either Page_fault_in_non_paged_area or
    Irql_not_less_or_equal If this is the first time with the error reboot your computer and if it does it again follow the following steps:
    Check to make sure any new hardware or software is properly installed if this is a new installation ask software administartor and check for windows updates.
    If problem continues remove and newly installed hardware or software diable bios memory such as caching or shadowing. If you need to use safemode to disable or remove components reboot computer and push f8 and select advanced setup and safemode.
    Technical Information:
    *** STOP: 0x00000050 (0xc2a40fc8, 0xc2a40fc8, 0x00000000
    Beginning dump of physical memory
    Physical memory dump completed
    Contact system administator for further assistance
    And the only thing that i think is newly installed is a power supply that the shop i had this thing built at put in. The reason i brought it to the shop in the first place was because it was getting a techincal error and rebooting in games now it is getting this error in games and just online HELP THIS IS ANNOYING!!!
    I have a pentium 4 2.4 ghz 80 gig hard drive with 8mb buffer 512 ram (I THINK ITS ONE STICK DONT KNOW) Geforce 4 Ti 4200 a 52x cd burner dvd combo dont know all the speeds and a 48x dvd drive help me!!!!!!!! thats all i know by the way

    It is possible the new power supply isn't strong enough.
    For starters try running memtest 86 on it for half an hour or so ( http://www.memtest86.com ).
    From an internet search it seems this stop error can be related to many things to it's hard to poinpoint anything specific, but it is also possible it's software/driver related.

  • Pendulum Game Unidentified Error Problem - HELP PLEASE!

    Hi,
    I am trying to create a second level to my pendulum game. The idea is the ball moves left or right using arrow keys, and gets score. timed 1 minute, and if it hits the pendulum it loses. if it survives the first 60 seconds it goes to level 2 with the menacing pendulum, same idea only then the game ends. My go to and play code is not working using the button. Please help this is urgent...Download Link for zip folder with the files: http://www.mayscar.com/DMA205/D4%20-%20TEST.zip
    Thanks!
    Ksenia Zlotin
    Director of Development
    Scar Productions

    Please contact your ISP provided.. Another user of this unit under same company and same router ARRIS experience this issue, while theyre able to connect to other network and router.. Remember if your unit can detect and connect toother network besiide your arris router your issue is with your provider ISP. (Comcast asking the other user to pay $80.00 for activation where I am curious)

  • Linked list error

    Can anyone tell what's wrong with the following code?
    It says arguments(int) is not supported, but I don't know what it means.
    Thank you.
    import java.util.*;
    public class tester {
          * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              LinkedList Customers = new LinkedList();
              for (int k=1;k<=5;k++)
                   Customers.addLast(k);
              System.out.println(Customers);
              System.out.println(Customers.indexOf(3));
              Customers.removeFirst();
              System.out.println(Customers);
              System.out.println(Customers.indexOf(3));
              System.out.println(Math.random()*10);
    }

    What version of Java are you using? Collections can only hold objects, not primitives. In Java 5 (or was it 4) they introduced autoboxing which automatically "boxes" the primitive value into its wrapper class and then stores that in the Collection.

  • Faster way to search linked list?

    I'm pretty new to programming and I have to write a kind of psuedo implementation of a cache using a linked list (has to be a linked list). The problem is when I'm setting the maximum size of the linked list to a high number (like 2000), it goes incredibly slow. I don't know how I can make this faster.
    Here are the 2 main methods I'm using for it:
    public void addObject(Object toAdd){
         cacheList.addFirst(toAdd);
         if(cacheList.size()>=maxAllowedSize){
              removeObject(maxAllowedSize-1);
    public boolean containsObject(Object toFind){
         boolean test=false;
         for(int x=0;x<cacheList.size();x++){
              if(toFind.equals(cacheList.get(x))){
                   test=true;
                   hits++;
                   removeObject(x);
                   addObject(toFind);
                   x=cacheList.size(); //ends for loop
         total++;
         return test;
    }Where maxAllowedSize is a command line argument and removeObject just calls cacheList.remove(index).
    For testing, I'm using a text file with something over 1.3 million words and using scanner to read them. Here is the code that calls the two methods:
    if(!cache.containsObject(currentWord)){
         cache.addObject(currentWord);
    }Since containsObject adds the word itself, this calls addObject if the word isn't found (added to the front of the list).
    Any help is greatly appreciated.

    darkambivalence wrote:
    Linked list is what was specified in my assignment.
    Then to be honest I expect that part of the learning of assignment is to see how a LinkedList is a poor choice for a list that you want to search.
    Why will that run poorly? Because what do you think remove is doing? The remove has to search to find the thing you want to remove. So it's doing that search twice. So it will be twice as slow.
    There really isn't much you can do to make this faster. LinkedLists are great for many reasons but "random" accessing (for searching for example) is not one of them. I suppose if one really wanted to squeeze out performance you could keep the list sorted. So when inserting insert into the "right" place in the list and then as you search if a value would fall in between two buckets and doesn't exist in your list you can stop there. A doubly linked list would probably help for this implementation.
    In the real world though you would either not use a LinkedList at all or a Map depending on the needs.

  • Linked lists problem -- help needed

    Hello again. I've got yet another problem in my C++ course that stems from my use of a Mac instead of Windows. I'm going to install Parallels so I can get Windows on my MacBook and install Visual Studio this week so that I don't have to deal with these discrepancies anymore, but in the meanwhile, I'm having a problem here that I don't know how to resolve. To be clear, I've spent a lot of time trying to work this out myself, so I'm not just throwing this up here to have you guys do the work for me -- I'm really stuck here, and am coming here as a last resort, so I'll be very, very appreciative for any help that anyone can offer.
    In my C++ course, we are on a chapter about linked lists, and the professor has given us a template to make the linked lists work. It comes in three files (a header, a source file, and a main source file). I've made some adjustments -- the original files the professor provided brought up 36 errors and a handful of warnings, but I altered the #include directives and got it down to 2 errors. The problematic part of the code (the part that contains the two errors) is in one of the function definitions, print_list(), in the source file. That function definition is shown below, and I've marked the two statements that have the errors using comments that say exactly what the errors say in my Xcode window under those two statements. If you want to see the entire template, I've pasted the full code from all three files at the bottom of this post, but for now, here is the function definition (in the source file) that contains the part of the code with the errors:
    void LinkedList::printlist( )
    // good for only a few nodes in a list
    if(isEmpty() == 1)
    cout << "No nodes to display" << endl;
    return;
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    { cout << setw(8) << CURSOR->name; } cout << endl; // error: 'setw' was not declared in this scope
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    { cout << setw(8) << CURSOR->test_grade; } cout << endl; // error: 'setw' was not declared in this scope
    As you can see, the problem is with the two statements that contain the 'setw' function. Can anyone help me figure out how to get this template working and get by these two errors? I don't know enough about linked lists to know what I can and can't mess with here to get it working. The professor recommended that I try using 'printf' instead of 'cout' for those two statements, but I don't know how to achieve the same effect (how to do whatever 'setw' does) using 'printf'. Can anyone please help me get this template working? Thank you very, very much.
    For reference, here is the full code from all three files that make up the template:
    linkedlist.h (header file):
    #ifndef LINKED_LINKED_H
    #define LINKED_LINKED_H
    struct NODE
    string name;
    int test_grade;
    NODE * link;
    class Linked_List
    public:
    Linked_List();
    void insert(string n, int score);
    void remove(string target);
    void print_list();
    private:
    bool isEmpty();
    NODE *FRONT_ptr, *REAR_ptr, *CURSOR, *INSERT, *PREVIOUS_ptr;
    #endif
    linkedlist.cpp (source file):
    #include <iostream>
    using namespace std;
    #include "linkedlist.h"
    LinkedList::LinkedList()
    FRONT_ptr = NULL;
    REAR_ptr = NULL;
    PREVIOUS_ptr = NULL;
    CURSOR = NULL;
    void Linked_List::insert(string n, int score)
    INSERT = new NODE;
    if(isEmpty()) // first item in List
    // collect information into INSERT NODE
    INSERT-> name = n;
    // must use strcpy to assign strings
    INSERT -> test_grade = score;
    INSERT -> link = NULL;
    FRONT_ptr = INSERT;
    REAR_ptr = INSERT;
    else // else what?? When would this happen??
    // collect information into INSERT NODE
    INSERT-> name = n; // must use strcpy to assign strings
    INSERT -> test_grade = score;
    REAR_ptr -> link = INSERT;
    INSERT -> link = NULL;
    REAR_ptr = INSERT;
    void LinkedList::printlist( )
    // good for only a few nodes in a list
    if(isEmpty() == 1)
    cout << "No nodes to display" << endl;
    return;
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    { cout << setw(8) << CURSOR->name; } cout << endl; // error: 'setw' was not declared in this scope
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    { cout << setw(8) << CURSOR->test_grade; } cout << endl; // error: 'setw' was not declared in this scope
    void Linked_List::remove(string target)
    // 3 possible places that NODES can be removed from in the Linked List
    // FRONT
    // MIDDLE
    // REAR
    // all 3 condition need to be covered and coded
    // use Trasversing to find TARGET
    PREVIOUS_ptr = NULL;
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    if(CURSOR->name == target) // match
    { break; } // function will still continue, CURSOR will
    // mark NODE to be removed
    else
    { PREVIOUS_ptr = CURSOR; } // PREVIOUS marks what NODE CURSOR is marking
    // JUST before CURSOR is about to move to the next NODE
    if(CURSOR == NULL) // never found a match
    { return; }
    else
    // check each condition FRONT, REAR and MIDDLE
    if(CURSOR == FRONT_ptr)
    // TARGET node was the first in the list
    FRONT_ptr = FRONT_ptr -> link; // moves FRONT_ptr up one node
    delete CURSOR; // deletes and return NODE back to free memory!!!
    return;
    }// why no need for PREVIOUS??
    else if (CURSOR == REAR_ptr) // TARGET node was the last in the list
    { // will need PREVIOUS for this one
    PREVIOUS_ptr -> link = NULL; // since this node will become the last in the list
    REAR_ptr = PREVIOUS_ptr; // = REAR_ptr; // moves REAR_ptr into correct position in list
    delete CURSOR; // deletes and return NODE back to free memory!!!
    return;
    else // TARGET node was the middle of the list
    { // will need PREVIOUS also for this one
    PREVIOUS_ptr -> link = CURSOR-> link; // moves PREV nodes' link to point where CURSOR nodes' points
    delete CURSOR; // deletes and return NODE back to free memory!!!
    return;
    bool Linked_List::isEmpty()
    if ((FRONT_ptr == NULL) && (REAR_ptr == NULL))
    { return true; }
    else
    { return false;}
    llmain.cpp (main source file):
    #include <iostream>
    #include <string>
    #include <iomanip>
    using namespace std;
    #include "linkedlist.h"
    int main()
    Linked_List one;
    one.insert("Angela", 261);
    one.insert("Jack", 20);
    one.insert("Peter", 120);
    one.insert("Chris", 270);
    one.print_list();
    one.remove("Jack");
    one.print_list();
    one.remove("Angela");
    one.print_list();
    one.remove("Chris");
    one.print_list();
    return 0;

    setw is the equivalent of the field width value in printf. In your code, the printf version would look like:
    printf("%8s", CURSOR->name.c_str());
    I much prefer printf over any I/O formatting in C++. See the printf man page for more information. I recommend using Bwana: http://www.bruji.com/bwana/
    I do think it is a good idea to verify your code on the platform it will be tested against. That means Visual Studio. However, you don't want to use Visual Studio. As you have found out, it gets people into too many bad habits. Linux is much the same way. Both development platforms are designed to build anything, whether or not it is syntactically correct. Both GNU and Microsoft have a long history of changing the language standards just to suit themselves.
    I don't know what level you are in the class, but I have a few tips for you. I'll phrase them so that they answers are a good exercise for the student
    * Look into const-correctness.
    * You don't need to compare a bool to 1. You can just use bool. Plus, any integer or pointer type has an implicit cast to bool.
    * Don't reuse your CURSOR pointer as a temporary index. Create a new pointer inside the for loop.
    * In C++, a struct is the same thing as a class, with all of its members public by default. You can create constructors and member functions in a struct.
    * Optimize your function arguments. Pass by const reference instead of by copy. You will need to use pass by copy at a later date, but don't worry about that now.
    * Look into initializer lists.
    * In C++ NULL and 0 are always the same.
    * Return the result of an expression instead of true or false. Technically this isn't officially Return Value Optimization, but it is a good habit.
    Of course, get it running first, then make it fancy.

  • Need help regarding Linked List

    I'm a beginner who just spent ages working on the following code.. but need help on re-implementing the following using a linked list, i.e. no array is allowed for customer records but you still can use arrays for names, address, etc.. Hopefully I've inserted enough comments..
    Help very much appreciated!! Thanks! =]
    import java.util.Scanner;
    import java.io.*;
    public class Bank
    /* Private variables declared so that the data is only accessible to its own
         class, but not to any other class, thus preventing other classes from
         referring to the data directly */
    private static Customer[] customerList = new Customer[30];               
         //Array of 30 objects created for storing information of each customer
    private static int noOfCustomers;                                                       
         //Integer used to store number of customers in customerList
         public static void main(String[] args)
              Scanner sc = new Scanner(System.in);
              menu();
         public static void menu()
              char choice;
              String filename;
              int custId,counter=0;
              double interestRate;
    Scanner sc = new Scanner(System.in);
              do
              //Displaying of Program Menu for user to choose
         System.out.println("ABC Bank Customer Management System Menu");     
         System.out.println("========================================");
         System.out.println("(1) Input Data from File");
         System.out.println("(2) Display Data");
         System.out.println("(3) Output Data to File");
                   System.out.println("(4) Delete Record");
                   System.out.println("(5) Update Record");
         System.out.println("(Q) Quit");
                   System.out.println();
                   System.out.print("Enter your choice: ");
                   String input = sc.next();
                   System.out.println();
                   choice = input.charAt(0);     
              //switch statement used to assign each 'selection' to its 'operation'               
         switch(choice)
         case '1': int noOfRecords;
                                       System.out.print("Enter file name: ");
              sc.nextLine();                                             
              filename = sc.nextLine();
                                       System.out.println();
              noOfRecords = readFile(filename);
    System.out.println(+noOfRecords+" records read.");
              break;
         case '2': displayRecords();
              break;
         case '3': writeFile();
         break;
                        case '4': System.out.print("Enter account ID to be deleted: ");
                                       sc.nextLine();
                                       custId = sc.nextInt();
                                       deleteRecord(custId);
                                       break;
                        case '5': if(counter==0)
              System.out.print("Enter current interest rate for saving account: ");
                                            sc.nextLine();
                                            interestRate = sc.nextDouble();
                                            update(interestRate);
                                            counter++;
                                       else
              System.out.println("Error: Accounts have been updated for the month.");
                                            break;
                   }System.out.println();
         }while(choice!='Q' && choice!='q');
    /* The method readFile() loads the customer list of a Bank from a specified
         text file fileName into customerList to be stored as array of Customer
         objects in customerList in ascending alphabetical order according to the
         customer names */
    public static int readFile(String fileName)
         int custId,i=0;
              String custName,custAddress,custBirthdate,custPhone,custAccType;
              double custBalance,curRate;
              boolean d;
    /* Try block to enclose statements that might throw an exception, followed by
         the catch block to handle the exception */
    try
                   Scanner sc = new Scanner(new File(fileName));
    while(sc.hasNext())          
    /* sc.next() gets rid of "Account", "Id" and "=" */
    sc.next();sc.next();sc.next();
    custId = sc.nextInt();
                        d=checkDuplicate(custId);               
    /* checkDuplicate() is a method created to locate duplicating ids in array */
    if(d==true)
    /* A return value of true indicates duplicating record and the sc.nextLine()
         will get rid of all the following lines to read the next customer's record */
                             sc.nextLine();sc.nextLine();sc.nextLine();
                             sc.nextLine();sc.nextLine();sc.nextLine();
                             continue;     
    /* A return value of false indicates no duplicating record and the following
         lines containing the information of that customer's record is being read
         in */
                        if(d==false)
    /* sc.next() gets rid of "Name" and "=" and name is changed to upper case*/
         sc.next();sc.next();
         custName = sc.nextLine().toUpperCase();
    /* sc.nextLine get rids of the following lines to read the next customer's
         record if length of name is more than 20 characters*/
         if(custName.length()>21)
    System.out.println("Name of custId "+custId+" is more than 20 characters");
                                  System.out.println();
         sc.nextLine();sc.nextLine();sc.nextLine();sc.nextLine();
         continue;
    /* sc.next() gets rid of "Address" and "=" */           
         sc.next();sc.next();
         custAddress = sc.nextLine();
    /* sc.nextLine get rids of the following lines to read the next customer's
         record if length of address is more than 80 characters*/                         
                             if(custAddress.length()>81)
    System.out.println("Address of custId "+custId+" is more than 80 characters");
                                  System.out.println();
         sc.nextLine();sc.nextLine();sc.nextLine();sc.nextLine();
         continue;
    /* sc.next() gets rid of "DOB" and "=" */                              
         sc.next();sc.next();
         custBirthdate = sc.nextLine();
    /* sc.nextLine get rids of the following lines to read the next customer's
         record if length of date of birth is more than 10 characters*/                         
                             if(custBirthdate.length()>11)
    System.out.println("D.O.B of custId "+custId+" is more than 10 characters");
                                  System.out.println();
         sc.nextLine();sc.nextLine();sc.nextLine();sc.nextLine();
         continue;
    /* sc.next() gets rid of "Phone", "Number" and "=" */                              
         sc.next();sc.next();sc.next();
         custPhone = sc.nextLine();
    /* sc.nextLine get rids of the following lines to read the next customer's
         record if length of phone number is more than 8 characters*/                         
                             if(custPhone.length()>9)
    System.out.println("Phone no. of custId "+custId+" is more than 8 characters");
                                  System.out.println();
         sc.nextLine();sc.nextLine();sc.nextLine();sc.nextLine();
         continue;
    /* sc.next() gets rid of "Account", "Balance" and "=" */                              
         sc.next();sc.next();sc.next();
         custBalance = sc.nextDouble();
    /* sc.next() gets rid of "Account", "Type" and "=" */                              
                             sc.next();sc.next();sc.next();
                             custAccType = sc.next();
                             if(custAccType.equals("Saving"))
    customerList[noOfCustomers] = new Account1(custId,custName,custAddress,custBirthdate,custPhone,custBalance,custAccType);
    sc.nextLine();
                                                 noOfCustomers++;
                                                 i++;
    else if(custAccType.equals("Checking"))
    customerList[noOfCustomers] = new Account2(custId,custName,custAddress,custBirthdate,custPhone,custBalance,custAccType);
                                                 sc.nextLine();
                                                 noOfCustomers++;
                                                 i++;
    else if(custAccType.equals("Fixed"))
    sc.next();sc.next();sc.next();sc.next();
                                                 curRate = sc.nextDouble();
                                                 Account3 temp = new Account3(custId,custName,custAddress,custBirthdate,custPhone,custBalance,custAccType,curRate);
                                                 customerList[noOfCustomers]=temp;
                                                 sc.nextLine();
                                                 noOfCustomers++;
                                                 i++;
                             else
                                  System.out.println("Account type not defined.");
         if(noOfCustomers==30)
         System.out.println("The customer list has reached its maximum limit of 30 records!");
         System.out.println();
         return noOfCustomers;
    //Exceptions to be caught
    catch (FileNotFoundException e)
    System.out.println("Error opening file");
    System.exit(0);
    catch (IOException e)
    System.out.println("IO error!");
    System.exit(0);
    /* Bubblesort method used to sort the array in ascending alphabetical order
         according to customer's name */
    bubbleSort(customerList);
              return i;
    /* The method displayRecords() displays the data of the customer records on
         screen */
    public static void displayRecords()
    int k;
    /* Displaying text using the printf() method */
         for(k=0;k<noOfCustomers;k++)
         System.out.printf("Name = %s\n", customerList[k].getName());
         System.out.printf("Account Balance = %.2f\n", customerList[k].getBalance());
         System.out.printf("Account Id = %d\n", customerList[k].getId());
    System.out.printf("Address = %s\n", customerList[k].getAddress());
    System.out.printf("DOB = %s\n", customerList[k].getBirthdate());
    System.out.printf("Phone Number = %s\n", customerList[k].getPhone());
         String type = customerList[k].getAccType();
         System.out.println("Account Type = " +type);
    if(type.equals("Fixed"))
         System.out.println("Fixed daily interest = "+((Account3)customerList[k]).getFixed());
         System.out.println();               
    /* The method writeFile() saves the content from customerList into a
         specified text file. Data is printed on the screen at the same time */
    public static void writeFile()
    /* Try block to enclose statements that might throw an exception, followed by
    the catch block to handle the exception */
    try
    int i;
              int n=0;
    //PrintWriter class used to write contents of studentList to specified file
              FileWriter fwStream = new FileWriter("newCustomers.txt");
              BufferedWriter bwStream = new BufferedWriter(fwStream);
              PrintWriter pwStream = new PrintWriter(bwStream);     
    for(i=0;i<noOfCustomers;i++)
         pwStream.println("Account Id = "+customerList.getId());
              pwStream.println("Name = "+customerList[i].getName());
    pwStream.println("Address = "+customerList[i].getAddress());
    pwStream.println("DOB = "+customerList[i].getBirthdate());
    pwStream.println("Phone Number = "+customerList[i].getPhone());
              pwStream.printf("Account Balance = %.2f\n", customerList[i].getBalance());
              pwStream.println("Account Type = "+customerList[i].getAccType());
                   if(customerList[i].getAccType().equals("Fixed"))
                        pwStream.println("Fixed Daily Interest = "+((Account3)customerList[i]).getFixed());
              pwStream.println();
              n++;
    //Closure of stream
    pwStream.close();
              System.out.println(+n+" records written.");
    catch(IOException e)
    System.out.println("IO error!");     
    System.exit(0);
         //Deletes specified record from list
    public static void deleteRecord(int id)
    int i;
              i=locate(id);
    if(i==200)
    //checking if account to be deleted does not exist
    System.out.println("Error: no account with the id of "+id+" found!");
              //if account exists
    else
                        while(i<noOfCustomers)
                             customerList[i] = customerList[i+1];
                             i++;
                        System.out.println("Account Id: "+id+" has been deleted");
                        --noOfCustomers;
         //Updates the accounts
    public static void update(double interest)
    int i,j,k;
              double custBalance,addition=0;
    for(i=0;i<noOfCustomers;i++)
                        if(customerList[i] instanceof Account1)
                             for(j=0;j<30;j++)
                                  addition=customerList[i].getBalance()*interest;
                                  custBalance=customerList[i].getBalance()+addition;
                                  customerList[i].setBalance(custBalance);
                        else if(customerList[i] instanceof Account2)
                             continue;
                        else if(customerList[i] instanceof Account3)
                             for(j=0;j<30;j++)
    addition=customerList[i].getBalance()*((Account3)customerList[i]).getFixed();
    custBalance=customerList[i].getBalance()+addition;
    customerList[i].setBalance(custBalance);
                        else
                             System.out.println("Account type not defined");
              System.out.println("The updated balances are: \n");
              for(k=0;k<noOfCustomers;k++)
    System.out.printf("Name = %s\n", customerList[k].getName());
    System.out.printf("Account Balance = %.2f\n", customerList[k].getBalance());
    System.out.println();
    /* ================== Additional methods ==================== */     
    /* Bubblesort method to sort the customerList in ascending alphabetical
         order according to customer's name */
    public static void bubbleSort(Customer[] x)
    int pass, index;
    Customer tempValue;      
    for(pass=0; pass<noOfCustomers-1; pass++)          
    for(index=0; index<noOfCustomers-1; index++)
    if(customerList[index].getName().compareToIgnoreCase(customerList[index+1].getName()) > 0)
    tempValue = x[index];
    x[index] = x[index+1];
    x[index+1]= tempValue;
    /* Method used to check for duplicated ids in array */     
         public static boolean checkDuplicate(int id)
              int i;
              for(i=0;i<noOfCustomers;i++)
                   if(id == customerList[i].getId())
    System.out.println("Account Id = "+id+" already exists");
                        System.out.println();
    return true;
              }return false;
    /* Method to seach for account id in array */
         public static int locate(int id)
              int j;
              for(j=0;j<noOfCustomers;j++)
                   if(customerList[j].getId()==id)
                        return j;
              j=200;
              return j;
    import java.util.Scanner;
    public class Customer
    /* The following private variables are declared so that the data is only
         accessible to its own class,but not to any other class, thus preventing
         other classes from referring to the data directly */
         protected int id;               
         protected String name,address,birthdate,phone,accType;                              
         protected double balance;               
    // Null constructor of Customer
         public Customer()
              id = 0;
              name = null;
              address = null;
              birthdate = null;
              phone = null;
              balance = 0;
              accType = null;
    /* The following statements with the keyword this activates the Customer
         (int id, String name String address, String birthdate, String phone, double
         balance) constructor that has six parameters of account id, name, address,
         date of birth, phone number, account balance and assign the values of the
         parameters to the instance variables of the object */     
         public Customer(int id, String name, String address, String birthdate, String phone, double balance, String accType)
    //this is the object reference that stores the receiver object     
              this.id = id;
              this.name = name;                         
              this.address = address;
              this.birthdate = birthdate;
              this.phone = phone;
              this.balance = balance;
              this.accType = accType;
    /* The following get methods getId(), getName(), getAddress(), getBirthdate(),
         getPhone(), getBalance() return the values of the corresponding instance
         properties */     
         public int getId()
              return id;
         public String getName()
              return name;
         public String getAddress()
              return address;
         public String getBirthdate()
              return birthdate;
         public String getPhone()
              return phone;
         public double getBalance()
              return balance;
         public String getAccType()
              return accType;
    /* The following set methods setId(), setName(), setAddress(), setBirthdate(),
         setPhone and setBalance() set the values of the corresponding instance
         properties */
         public void setId (int custId)
              id = custId;
         public void setName(String custName)
              name = custName;
         public void setAddress (String custAddress)
              address = custAddress;
         public void setBirthdate (String custBirthdate)
              birthdate = custBirthdate;
         public void setPhone (String custPhone)
              phone = custPhone;
         public void setBalance (double custBalance)
              balance = custBalance;
         public void setAccType (String custAccType)
              accType = custAccType;
    class Account1 extends Customer
         public Account1(int id, String name, String address, String birthdate, String phone, double balance, String accType)
              super(id,name,address,birthdate,phone,balance,accType);
              this.id = id;
              this.name = name;                         
              this.address = address;
              this.birthdate = birthdate;
              this.phone = phone;
              this.balance = balance;
              this.accType = accType;
    class Account2 extends Customer
         public Account2(int id, String name, String address, String birthdate, String phone, double balance, String accType)
              super(id,name,address,birthdate,phone,balance,accType);
              this.id = id;
              this.name = name;                         
              this.address = address;
              this.birthdate = birthdate;
              this.phone = phone;
              this.balance = balance;
              this.accType = accType;
    class Account3 extends Customer
         protected double fixed=0;
         public Account3(int id, String name, String address, String birthdate, String phone, double balance, String accType, double fixed)
              super(id,name,address,birthdate,phone,balance,accType);
              this.id = id;
              this.name = name;                         
              this.address = address;
              this.birthdate = birthdate;
              this.phone = phone;
              this.balance = balance;
              this.accType = accType;
              this.fixed = fixed;
         public double getFixed()
              return fixed;
    Example of a customers.txt
    Account Id = 123
    Name = Matt Damon
    Address = 465 Ripley Boulevard, Oscar Mansion, Singapore 7666322
    DOB = 10-10-1970
    Phone Number = 790-3233
    Account Balance = 405600.00
    Account Type = Fixed
    Fixed Daily Interest = 0.05
    Account Id = 126
    Name = Ben Affleck
    Address = 200 Hunting Street, Singapore 784563
    DOB = 25-10-1968
    Phone Number = 432-4579
    Account Balance = 530045.00
    Account Type = Saving
    Account Id = 65
    Name = Salma Hayek
    Address = 45 Mexican Boulevard, Hotel California, Singapore 467822
    DOB = 06-04-73
    Phone Number = 790-0000
    Account Balance = 2345.00
    Account Type = Checking
    Account Id = 78
    Name = Phua Chu Kang
    Address = 50 PCK Avenue, Singapore 639798
    DOB = 11-08-64
    Phone Number = 345-6780
    Account Balance = 0.00
    Account Type = Checking
    Account Id = 234
    Name = Zoe Tay
    Address = 100 Blue Eyed St, Singapore 456872
    DOB = 15-02-68
    Phone Number = 456-1234
    Account Balance = 600.00
    Account Type = Saving

    1) When you post code, please use[code] and [/code] tags as described in Formatting tips on the message entry page. It makes it much easier to read.
    2) Don't just post a huge pile of code and ask, "How do I make this work?" Ask a specific question, and post just enough code to demonstrate the problem you're having.
    3) Don't just write a huge pile of code and then test it. Write a tiny piece, test it. Then write the piece that will work with or use the first piece. Test that by itself--without the first piece. Then put the two together and test that. Only move on to the next step after the current step produces the correct results. Continue this process until you have a complete, working program.

Maybe you are looking for

  • Songs ripped from CDs play in iTunes but skip on my iPhone after an upgrade to iTunes 11

    I recently upgraded to iTunes 11 and following the upgrade noticed that certain songs were not playing on my iPhone 5C (iOS 7.1.1). They show in my Library on the phone but skip straight through on the player. They also show with a red stop sign and

  • Computer went into sleep mode and will not wake up!

    I have a HP Pavilion a350n which I love and have never had a problem with it.....until now. When I turn it on I get a black screen with a small window that reads "Warning" "PC entering power saving mode"  Then the screen goes blank and the blue power

  • Blackberry link wont connect to my z10

    I tried to connect my z10 to blackberry link so I could transfer music and pictures.  It has an error message and wont connect unless I restore my entire device to factory settings... I spent all day getting the phone running and personalized, I don'

  • Blue G3 20" Studio Display

    I have a monitor that has never worked properly. Two weeks after buying the said product the picture went, it then took a further 6 months to get the monitor returned and fixed. Two weeks after it came back the picture went vertical on me, the width

  • Re: I need to activate Windows but my code sticker has faded

    My computer died so we have reinstalled Windows only problem is though is the activation code that comes with the computer has faded off and the stickers all kinda weird. Microsoft have told me to ask toshiba if they can track which activation code w