• Member Avatar for Maritimo
    Maritimo

    Replied To a Post in heap short and heap tree about help me pls

    We don´t do the homework of anybody. Work on your problem and make some questions. We will only give you some hints.
  • Member Avatar for Maritimo
    Maritimo

    Marked Solved Status for Copy assignment and inheritance.

    One of my students make me a question (which answer i know) but I think could be instructive to formulate the same question here so many people can learn about …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in Copy assignment and inheritance.

    Nathan Oliver, you gave the write answer. My plan was to let some time for others to think about. But thank you. Also your correction about the self assignment is …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in Copy assignment and inheritance.

    Rubberman: I chanched the down-vote. Sorry. Please don´t go into a war.
  • Member Avatar for Maritimo
    Maritimo

    Gave Reputation to rubberman in Copy assignment and inheritance.

    Well, there are a number of problems with your code. Example, in the class B constructor, this B(int i1_, int i2_) : A{i1_}, i2{i2_} {} should be this B(int i1_, …
  • Member Avatar for Maritimo
    Maritimo

    Gave Reputation to rubberman in Copy assignment and inheritance.

    Well, there are a number of problems with your code. Example, in the class B constructor, this B(int i1_, int i2_) : A{i1_}, i2{i2_} {} should be this B(int i1_, …
  • Member Avatar for Maritimo
    Maritimo

    Gave Reputation to rubberman in Copy assignment and inheritance.

    Well, there are a number of problems with your code. Example, in the class B constructor, this B(int i1_, int i2_) : A{i1_}, i2{i2_} {} should be this B(int i1_, …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in Copy assignment and inheritance.

    Interesting point. I am using C++11. On C++11 you should use `{ }` instead of `( )`. This is called the universal initialization. It is not an error. On C++03 …
  • Member Avatar for Maritimo
    Maritimo

    Edited Copy assignment and inheritance.

    One of my students make me a question (which answer i know) but I think could be instructive to formulate the same question here so many people can learn about …
  • Member Avatar for Maritimo
    Maritimo

    Edited Copy assignment and inheritance.

    One of my students make me a question (which answer i know) but I think could be instructive to formulate the same question here so many people can learn about …
  • Member Avatar for Maritimo
    Maritimo

    Stopped Watching o notation problem

    Let a be any positive number. Show that a^n = o(n!). I am a beginner at this course and nead a head start. can anyone please help me solving this …
  • Member Avatar for Maritimo
    Maritimo

    Stopped Watching help

    Implement a C function that can perform addition of two 15-digit (positive) integers. As in C the maximum integer number that can be stored in memory is 2147483647 it is …
  • Member Avatar for Maritimo
    Maritimo

    Edited Copy assignment and inheritance.

    One of my students make me a question (which answer i know) but I think could be instructive to formulate the same question here so many people can learn about …
  • Member Avatar for Maritimo
    Maritimo

    Created Copy assignment and inheritance.

    One of my students make me a question (which answer i know) but I think could be instructive to formulate the same question here so many people can learn about …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching Copy assignment and inheritance.

    One of my students make me a question (which answer i know) but I think could be instructive to formulate the same question here so many people can learn about …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching c++ sort text file

    I need a help , to make this code to sort data from text file.Any help is appreciated! file: 50 72 10 30 90 4 23 #include<iostream> #include<conio.h> void mergesort(int[],int,int); …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in c++ sort text file

    I recomend to you to use `vector<int> v` and `sort(v.begin(), v.end());` all your program can be written in less than 10 lines.
  • Member Avatar for Maritimo
    Maritimo

    Stopped Watching Simpson's rule

    Hello. I need to write a program to evaluate a definite integral with Simpson's composite rule. 1. ![fb9ac9a01f247c8a0ed8a606b7c10f4a](/attachments/small/4/fb9ac9a01f247c8a0ed8a606b7c10f4a.png "align-left") I know there is a Simpson's rule available in Scipy, but …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching recursion inverted asterisk triangle

    how to draw an inverted triangle after asking the user for the number of rows in c++ usin reursion not for loop as this code #include<stdio.h> #include <conio.h> int main() …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in recursion inverted asterisk triangle

    I preffer the following alternative that print an inverted trinagle with any specified number of lines: #include <iostream> void makeInvTri(int rows, int spaces = 0) { if (rows < 0) …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching help

    Implement a C function that can perform addition of two 15-digit (positive) integers. As in C the maximum integer number that can be stored in memory is 2147483647 it is …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in help

    I recomend you to use a little endian representation of your string numbers, because it is easy to manage the carry. You can try something like: string add(const string& n1, …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching dynamic object arry

    how to create dynamic object array with over loaded constructor call plz help and tell me the syntax ...
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in dynamic object arry

    You can try something like this: class myIntArray { int* data; public: myIntArray(int size) : data(new int[size]) {} ~myIntArray() {delete[] data;} int& operator[] (int pos) {return data[pos];} //... };
  • Member Avatar for Maritimo
    Maritimo

    Stopped Watching Confused with functions

    Okay so first is I am confused with the void function. It is said that void function does not return a value. If for example I have a void function …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching Confused with functions

    Okay so first is I am confused with the void function. It is said that void function does not return a value. If for example I have a void function …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in Confused with functions

    A function can return a value, for example: `int addOne(int a) {return a+1;}` and be used like: `b = addOne(b);` Also it can not return a value, for example: `void …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching setting an array to -1

    If you want to set an entire array to -1 is better to cycle through it with a for loop like this? for (int i = 0; i < 100; …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in setting an array to -1

    `void* memset( void* dest, int ch, std::size_t count );` Converts the value ch to unsigned char and copies it into each of the first count characters of the object pointed …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching header files

    The purpose of header files is soley to satisfy the compiler?
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in header files

    In C/C++ you must define everything befor use it. For example, if you need a variable to store an integer --say a--, first you must define it like: `int a;` …
  • Member Avatar for Maritimo
    Maritimo

    Stopped Watching infinite loop

    the problem I have here is: when I input an integer it works fine, but when i input any other thing, it doesn't give me a chance to input again …
  • Member Avatar for Maritimo
    Maritimo

    Stopped Watching How to reverse a string in C?

    I am following Kernighan and Ritchie to learn C and my solution to exercise 1.19, to reverse a string, does not work. Intermediate print out indicates it is working, but …
  • Member Avatar for Maritimo
    Maritimo

    Stopped Watching [win32] - how can send a message to another program?

    i know move the mouse for where i want. but how can send a click message to another program?
  • Member Avatar for Maritimo
    Maritimo

    Stopped Watching What is the most powerful programming language?

    Aside from the Assembly Language, what is the most powerful language?
  • Member Avatar for Maritimo
    Maritimo

    Began Watching How to reverse a string in C?

    I am following Kernighan and Ritchie to learn C and my solution to exercise 1.19, to reverse a string, does not work. Intermediate print out indicates it is working, but …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in How to reverse a string in C?

    I think you are doing a good job. Continue. I recomend you to change the reverse function with: void reverse(char line[], int len) { int i; char tmp; --len; for(i=0; …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching programming

    write a program that takes a four digits integer from user and shows the digits on the screen separately i.e. if user enters 7531, it displays 7, 5, 3, 1 …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in programming

    You could use something like: string s; cin >> s; for(char c : s) cout << c << ", "; but you need to solve how to not write the …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching How to delete an element from an array?

    Hello C++ Nerds! I am creating a list using Arrays. And I want to have AddItem, DeleteItem functions in those lists. But as you know, you can't delete an element …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching Reading Data from Files

    I need to read data from a file given to me by using an array. Data in file looks like this: "Jones C A B B D A B C …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching infinite loop

    the problem I have here is: when I input an integer it works fine, but when i input any other thing, it doesn't give me a chance to input again …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching Simpson's rule

    Hello. I need to write a program to evaluate a definite integral with Simpson's composite rule. 1. ![fb9ac9a01f247c8a0ed8a606b7c10f4a](/attachments/small/4/fb9ac9a01f247c8a0ed8a606b7c10f4a.png "align-left") I know there is a Simpson's rule available in Scipy, but …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching What are the areas of the use of the language of C/C++?

    What are the areas (uses) of the use of the language of C/C++? i want advanced uses of c/c++ to choose the best for me and for the future.
  • Member Avatar for Maritimo
    Maritimo

    Began Watching [win32] - how can send a message to another program?

    i know move the mouse for where i want. but how can send a click message to another program?
  • Member Avatar for Maritimo
    Maritimo

    Began Watching Manipulating A Text

    I have to write a code on c++(dev c++ actually) that counts the number of each letter,and give a percentage of using for each letter....But i don't know how put …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching One-Dimensional Array

    Can anybody help me with my program? I can't get the example. Here's the question: Create a program that accepts an array of characters. And displays the converted array of …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching c++ templates help

    So i have this class called Numbers and I want to be able to take in doubles or integers. I know i have to use templates but I'm confused can …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching o notation problem

    Let a be any positive number. Show that a^n = o(n!). I am a beginner at this course and nead a head start. can anyone please help me solving this …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in o notation problem

    I don´t think that a^n = O(n!). Supposing that O(x) means the order of magnitude of the number of computer operations you need to compute something, this means that O(2) …

The End.