User Profile

Collapse

Profile Sidebar

Collapse
newatthis
newatthis
Last Activity: Nov 23 '06, 05:58 AM
Joined: Sep 23 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • newatthis
    started a topic some advice please
    in C

    some advice please

    i have an excercise which i am having trouble with, its is regarding a vector array and searching for dupliacte entries

    Code:
    #include <iostream>
    #include <algorithm>
    #include <ios>
    #include <string>
    #include <vector>
    #include <iomanip>
    
    int main()
    {
    	std::vector<double> numbers;
    
    	double x;
    ...
    See more | Go to post

  • newatthis
    replied to real noob question
    in C
    i see i think i am getting a clearer picture now

    Code:
    std::vector<double> test(10);
    would be an array with 10 elements, indexed from 0-9

    so if one were to perform the action
    Code:
     test.size()
    it would return an integer value of the size of the array which in the above example would be 10

    we can therefore use the size() -1 to access the last index?

    please correct...
    See more | Go to post

    Leave a comment:


  • newatthis
    started a topic real noob question
    in C

    real noob question

    hi am new at c++ and am trying my best to learn but am having a little trouble understand one aspect that has been repeated in many text books all with very vague explanations.

    i am hoping someone can clear some of this up for me.

    my question is in regards to arrays and vectors.

    i understand that c++ counts from 0+ and not the natural numbers 1+

    so an array of test(23) would be in the range...
    See more | Go to post
No activity results to display
Show More
Working...