• Member Avatar for Maritimo
    Maritimo

    Began Watching What is the most powerful programming language?

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

    Replied To a Post in What is the most powerful programming language?

    Definitivelly the most powerfull language of all times is... English. The most powerfull computer is an... Engineer. Explain your problem to an Engineer in English, and he/she will solve it! …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching Ascending code from text file in c++

    void ascending() { int i=0; const int SIZE = 20; DrinkRecord s[SIZE]; system("cls"); ifstream infile; infile.open("drinks.txt");//open your file if(!infile)//check to make sure its open before trying to initialize list items …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in Ascending code from text file in c++

    What is the proble you have with this code? 1 Do not compile? 2 Do not give the expected results? 3 You do not undertand what is does? 4....
  • 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

    Replied To a Post in c++ templates help

    You could user something like: struct Number { union Value {int i; double d;} value; enum Type {integer, real, none} type; Number(): type{Type::none} {} void setvalue(int i) {value.i = i; …
  • 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

    Replied To a Post in One-Dimensional Array

    You could define the following function: char invert(char c) { return isupper(c)? tolower(c) : toupper(c); } and then use like this: for(int i=0; input[i] != '\0'; i++) input[i]=invert(input[i]);
  • 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

    Replied To a Post in Manipulating A Text

    You could use something like this: std::map<char,int> dict; int c; while((c = getchar())!=EOF) dict[c]++; for(char& p : dict) std::cout << p.first << ": " << p.second << std::endl;
  • 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

    Replied To a Post in [win32] - how can send a message to another program?

    I don´t think thos is a C++ problem. It seems an operating system problem. Which is your operating system?
  • 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

    Replied To a Post in What are the areas of the use of the language of C/C++?

    I would want to add the following: C: C compiler is written in C. C++: C++ compiler is written in C++. Java: Sun actually has multiple JVMs. The HotSpot JVM …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in Simpson's rule

    Yap, you are wright. I wrote: while(k < 2*n-1) and double s = f(a) + f(b); Insted of: while(k <= 2*n-1) and double s = f(a) - f(b); Sorry. Also, …
  • 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

    Replied To a Post in Reading Data from Files

    Your problem is that char grades[] don´t have the required space of memory. Try something like: char grades[100]; and be sure that counter is alway below 99.
  • 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

    Replied To a Post in infinite loop

    This should work: #include <iostream> using namespace std; int main() { int var; cout << "please enter any integer" << endl; while(!(cin>>var)) { cin.clear(); cin.ignore(1000,'\n'); cout << "Error, enter the …
  • 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

    Replied To a Post in Simpson's rule

    The analitical answer is 0.440244, so this is the limit that you must arrive with a lot of intervals. Here you have your code modified to the right answer: #include …
  • 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

    Replied To a Post in How to delete an element from an array?

    This easy code delete multiple occurences of ItemType x from a and works even for an array plenty of only x: void SortedList::DeleteItem(ItemType x) { int i=-1, j=0; while(j<MAX_ITEMS) { …

The End.