User Profile

Collapse

Profile Sidebar

Collapse
babe20042004
babe20042004
Last Activity: May 5 '11, 09:41 PM
Joined: Oct 21 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • babe20042004
    started a topic Simple linked list problem
    in Java

    Simple linked list problem

    My function round1(boolean qualify, int goals) is supposed to go through a list of nodes comparing every 2 side by side nodes for the highest goals and then has the boolean variable qualify changed to false for the node with the lowest goals. The nodes with qualify as false are then deleted from the list using remUnqualify() .However when I print the 2nd time around it prints a blank stack.
    Here is my code:
    Code:
    import java.io.*;
    ...
    See more | Go to post

  • babe20042004
    replied to Why is it that my stack isn't working?
    in Java
    I got it to work
    Code:
    while( ! stack.isEmpty() ){
    Country s=(Country) stack.pop();
    System.out.println(s.name);
    }
    See more | Go to post

    Leave a comment:


  • babe20042004
    started a topic Why is it that my stack isn't working?
    in Java

    Why is it that my stack isn't working?

    I have a program that reads the names of countries from a file, prints them to the screen then prints thm from the stack. However when it prints from the stack this is the resulting output:

    Returning what is in the stack

    Country@42e816
    Country@9304b1
    Country@190d11
    Country@a90653

    Can someone help me please?
    This is the code:
    Code:
    import java.io.*;
    
    public class StackOfObjects
    ...
    See more | Go to post

  • How can I make this program work? Problem with arrays

    Code:
    #include<iostream>
    #include<string>
    
    using namespace std;
    void details( string fNum,int dHour,int dMin,int aHour,int aMin, string aircraft);
    
    int main()
    {
     //Flights tB:Trinidad-Barbados,tN:Trinidad to New York,tL:Trinidad to London.
            int dHour;
            int dMin;
            string fNum;
            int aHour;
            int aMin;
            int
    ...
    See more | Go to post

  • babe20042004
    started a topic Finding every nth number in an array set
    in C

    Finding every nth number in an array set

    How would I go about finding every nth number in an array set? For example if i had a set containing the numbers 1-100 int each cell, how would I go about finding every 3rd number in the set.
    See more | Go to post

  • babe20042004
    replied to Problem with c++ getline
    in C
    Thanks. Yep. That was the problem....
    See more | Go to post

    Leave a comment:


  • babe20042004
    replied to Problem with c++ getline
    in C
    Thank you so much but i found the source of the problem . I had to include cin.get(); for some strange new reason. here's the new code.

    #include <iostream>
    #include <string>
    #include <fstream>
    using namespace std;

    int main()
    {

    char name[256];
    char id[256];
    string degree;
    string courses;

    cout <<"Please insert...
    See more | Go to post

    Leave a comment:


  • babe20042004
    started a topic Problem with c++ getline
    in C

    Problem with c++ getline

    I'm using the getline function to read the Degree Program of the user but for some reason the program skips the degree program and goes on to the next line which asks for the courses that the useris doing this semester.
    This is the code:

    #include <iostream>
    #include <string>

    using namespace std;

    int main()
    {

    char name[256];
    char id[256];
    ...
    See more | Go to post
No activity results to display
Show More
Working...