Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4028054
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:10:23+00:00 2026-05-20T11:10:23+00:00

void currentfor() { if(current == NULL) { cout << You don’t have any members

  • 0
void currentfor() 

{

   if(current == NULL) 

{

      cout << "You don't have any members yet!" << endl;

   }
 else
 {

 if (current->next == NULL)

         cout << "This is the end of the list." << endl;
      else
         current = current->next;
   }

}

void currentbac() 
{

   if (current == first)

      cout << "This is the beginning of the list." << endl;

   else
 {

      list *previous;

      previous = first;

      while (previous->next != current)
 {

         previous = previous->next;

      }

      current = previous;

   }

}

I’m ALMOST there but there’s still an issue.

How do I know where my current position is when I move my current position? Because whenever I use these two move functions it doesn’t seem to be working. I try to add a node at the “current” position when I move but its always adding the item at the end after all the nodes.

PLUS in my previous code I’m not able to change the fact that the “<–current position” is pointing at all the nodes and not at one node.

I want to point to one node so its more clear that user knows that’s where the current pointer is.

Hope people understood .-. I’m just not used to C++ but my professor wants me to learn on my own ( whatever that means) I’ve been trying to get references online its so hard to get linked list info for the project I’m doing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T11:10:23+00:00Added an answer on May 20, 2026 at 11:10 am

    “I try to add a node at the “current”position when i move but its always adding at the end after all the nodes.”

    The problem is with you add node code, not your moving code.

    You have not posted your add node code, so it is very hard to say what the problem is. You will have to unlink the nodes before and after the new node and link them to the new node, and lso link the new node to the two old ones before and after – always remembering to handle the first and last node carefully. Have you done all that?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: private void HandleGUI() { if (_currentForm == null) { navigationSideBar1.Visible
I have this code: void getStringWithTag(char* pFile, long sizeSound, char* tag, char* ret, float*
void SaveFiles(out XElement Attachments) { Attachments = null; if (Uploader1.UploadedFiles.Count() > 0) { Attachments
I am very close to finishing this project however I have a problem that
I have been trying to get my head around this but it hasn't been
This should be a fundamental C# question. Suppose I have a Person class which
I have this interesting situation. I have a bunch of structs that hold a
So i have this datagridview1 filled with a datatable(index 1) in a dataset(db1) and
This is very odd and I'm wondering if anyone has any thoughts? I'm trying
I have a wpf page hosted in a Window. But i get Null exception

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.