Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: loves_oi

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. giving one line command that prints lots of lines - ostream?

    I'm using cout to print lots of lines. But i want to put together them in one variable etc. Then , i want to print it.
    I think i can do it with ostream but I cant do it . Is there anybody to give...
  2. class template Convert which can convert itself to any data type

    template<class T>
    class Convert
    {
    T data;
    public:
    Convert(const T& tData = T()) : data(tData)
    { }

    template<class C>
    bool IsEqualTo( const C& other ) const
  3. Replies
    2
    Views
    765

    is "try catch" stops running ???

    I have the below main .


    int main(void)
    {
    try{
    Product p1("makarna", "gida", 1,9 );
    Product p2("peynir", "gida", 3,4 );
    Product p3("peynir", "gida", 3,10 );
    Product p4("cif",...
  4. Replies
    2
    Views
    553

    Vectors iterators

    this is my header file

    #ifndef HW1_H
    #define HW1_H
    #include <iostream>
    #include <string>
    #include <vector>

    using namespace std;
  5. Replies
    4
    Views
    630

    Re: vector iterator

    i spend one hour for it . But i forgot a small point :( i found thanks to God. I forgot including Product class. After including, it worked. Thanks for your interest
  6. Replies
    4
    Views
    630

    vector iterator

    Product Store::getProduct(int index)
    {
    int indexim=0;
    vector<Product>::iterator it;

    for ( it=(this->availableProducts.begin()) ; it < (this->availableProducts.end()); it++,indexim++ )
    {...
  7. Re: To Reach a member function of a class from ostream function(class's friend)

    This is the header and it's forbidden to make any change in header.




    class Product
    {

    private:
  8. Re: To Reach a member function of a class from ostream function(class's friend)

    no,there arent. all is mutator
  9. Re: To Reach a member function of a class from ostream function(class's friend)

    Ok. second option is worked. BUt now i want to reach shoppingList vector.It's type of productClass

    and Product class is


    class Product
    {

    private:
    string productName;
  10. To Reach a member function of a class from ostream function(class's friend)

    class Order /* It is forbidden to change here*/
    {

    private:

    string orderID;
    int orderDate;
    string customerID;
    string storeName;
    vector<Product> shoppingList;
  11. Re: adding items to vector class from another class' method or main function

    ok. then how can i print the items which exist in the vector with the help of a function?
  12. adding items to vector class from another class' method or main function

    #include <vector>
    #include <iostream>

    class Product
    {

    private:

    string productName;
    string productType;
  13. Replies
    14
    Views
    2,024

    Re: Dynamic array of struct inside a struct

    ok. I understand. Thanks a lot.
  14. Replies
    14
    Views
    2,024

    Re: Dynamic array of struct inside a struct

    Interestingly , No it is not a mistake .When i compile and run with this:




    memcpy(snacks.ncandy[0].bar_name, &MyChocolate, sizeof(candybar));


    outputs is:
  15. Replies
    14
    Views
    2,024

    Re: Dynamic array of struct inside a struct

    ??
  16. Replies
    14
    Views
    2,024

    Re: Dynamic array of struct inside a struct

    I study the code which is Paul McKenzie's last post and add only couts at last. That's it:



    #include <cstring>
    #include <iostream>
    int main()
    {
    using namespace std;
    struct candybar
  17. Replies
    9
    Views
    840

    Re: Why p and q is noT NULL ?

    Thanks for all replies . You informed me very well.
  18. Replies
    9
    Views
    840

    Re: Why p and q is noT NULL ?

    No , it shouldn't because in my first thread(i copy paste below) , p is an allocated pointer and q is not an allocated pointer. Both of them doesn't equal Null when i run the program.The output is...
  19. Replies
    9
    Views
    840

    Re: Why p and q is noT NULL ?

    I am trying to understand this code.I find it from the web and copy paste directly. The comments are not mine.

    I want you to focus on insert function firstly.


    int create(struct node *p, int...
  20. Replies
    9
    Views
    840

    Re: Why p and q is noT NULL ?

    I understand in this way from your words:

    We take space from memory randomly. Thus p is most probably Not NULL but it can be Null ( the possibility of being Null is very low) .

    We don't...
  21. Replies
    9
    Views
    840

    Why p and q is noT NULL ?

    #include <stdio.h>
    #include <conio.h>

    struct node
    {
    int num;
    struct node *next;
    };
  22. Replies
    5
    Views
    792

    Re: How to make a function change a variable

    the first one doesn't change the value of myKnap.W .
    i have tried the second one and fixed some deficient point in your code. It should be correct.




    #include<iostream>
    using namespace std;...
  23. Replies
    3
    Views
    503

    Re: Teaching yourself C++ ?

    If you mention about data structures in C++,i recommend you the book: DATA STRUCTURES AND ALGORITHM ANALYSIS IN C++. By MARK ALLEN WEISS
  24. Replies
    3
    Views
    328

    Re: template question

    Why don't we use in this way??



    // definition of template class member function
    template <class T>
    T mypair::getmax() const
    {
    // ...
    }
  25. Thread: ostream??

    by loves_oi
    Replies
    4
    Views
    435

    Re: ostream??

    OK.But i couldn't any example - any code which has ostream??Could you clarify and show it with an easy example??
Results 1 to 25 of 42
Page 1 of 2 1 2


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center