• Member Avatar for Maritimo
    Maritimo

    Replied To a Post in Occuring symbol per line

    If you want to count the total numbers of `;` in your file, don't use an array `int dotcoma[150]`, just use a simple variable `int dotcoma` and increment it when …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching Need help

    Reading Stroustrup: Programming -- Principles and Practice Using C++, chapter 4, exercise 4: "Write a program to play a numbers guessing game. The user thinks of a number between 1 …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in Need help

    Your program should structure something like this: int low=1; int high=100; while(low<high) { int half=(low+high)/2; std::cout << "Is your number greather than " << half <<"? (Y/N): "; char answer; …
  • Member Avatar for Maritimo
    Maritimo

    Stopped 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

    Stopped Watching Does anyone know why this code gives me a segmentation Fault?

    http://pastesrc.com/view/JbIfLyTVbu I've been looking over the Web, but cannot seem to get it to work...
  • Member Avatar for Maritimo
    Maritimo

    Stopped 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

    Stopped 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

    Stopped 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

    Stopped Watching header files

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

    Stopped 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

    Stopped 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

    Stopped 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

    Stopped 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

    Stopped 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

    Stopped 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

    Stopped 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

    Stopped 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 Why editing hexadecimal "code" affect programs and certification so much?

    Recently I opened game with "hex editor". You know, it's kind of program for newbies that makes it able to read program in hexadecimal code and make it able to …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in Why editing hexadecimal "code" affect programs and certification so much?

    I don't think this web is to teach how to crack a programm. Anyway, if you want to crack a code, you need to know a lot that seems you …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching How to find zero used in given number?

    Sample output: Please enter a number(Less than 8 digits): 1203021 how can I sure only 8 digits key in and how to count the zero inside the given number. Please …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in How to find zero used in given number?

    The same question had been asked on C++ forum.
  • Member Avatar for Maritimo
    Maritimo

    Began Watching Can't find error problem - error: expected expression before ‘=’ token

    Hi, I wrote the following program: #include <stdio.h> #include <stdlib.h> #define TRUE = 1; #define FALSE = 0; static int *arr; static int size=0; void createSet() { arr= (int *)malloc(sizeof(int)); …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in Can't find error problem - error: expected expression before ‘=’ token

    Replace #define TRUE = 1; #define FALSE = 0; with #define TRUE 1; #define FALSE 0; I don't know what you program must do but with this replacements there should …
  • Member Avatar for Maritimo
    Maritimo

    Stopped Watching Need help

    I need to write a program like this Sample output: Please enter a number(Less than 8 digits): 1203021 There are 2 zero (0) in this number I dont know how …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching Need help

    I need to write a program like this Sample output: Please enter a number(Less than 8 digits): 1203021 There are 2 zero (0) in this number I dont know how …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in Need help

    Taking into account that: If a number N ends in zero then the remainder of N integer divided by ten is zero You could count the number of zeroes inside …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in BlackJack 2.0

    Maazu: Following with this programming style open example, should be very interesting and instructive if you can show the modifications to implement your idea of client/server model. Hope you have …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in BlackJack 2.0

    Well, this project really is from Lilgenski16. I did it completelly because I wanted to use it as an example as a programming style in the forum to be commented …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching How to delete column in 2d vector, c++

    Dear all, If i have a vector inside a vector creating a matrix, how do I delete a specific column in that matrix. I have already populated the 2d vector …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in How to delete column in 2d vector, c++

    You need to include a for clause to delete the required column on every row: `for(auto& r : vec) r.erase(r.begin()+col)`
  • Member Avatar for Maritimo
    Maritimo

    Began Watching read from file - and write to another

    Hey, I know how to read from file.. I would to save it and send it to another function that can print it out that is in a different c …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in read from file - and write to another

    I recomend you to use strings, neither chars nor pointers. `#include <string>` and then `string s = "Ctor of class Brain Called";` finally `void Taxi::PrintTaxi(const string& a)` Remember, you are …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in BlackJack 2.0

    Following your recomendations, the operator<< of class Card must be changed to: ostream& operator<<(ostream& os, const Card& card) { switch(card.m_Rank) { case Card::ACE: os << "A"; break; // Program Hierarchy …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching Could someone please help me with this?

    #include <cstdlib> #include <iostream> #include <string.h> #include <cstdlib> using namespace std; int main(int argc, char *argv[]) { int airp[13][6], row[2]; string t; char airc[13][6], s; for(int i = 0; i …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in Could someone please help me with this?

    Hi, you can do something like this: //... cout<<"Do you want to continue (Y/N): "; cin>>t; if (t == "Y" || t == "y") break; // Or any other way …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in C or C++

    Yes, we largely agree! In my previous post I didn't write the good things about C. Two of them that I can mention are the short time you need to …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching Output numbers from 1 to 12 and write a message beside a number?

    Here is what I have so far: #include <iostream> using namespace std; int main() { int i; for (i = 1; i <= 12; i++) { cout << i << …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in Output numbers from 1 to 12 and write a message beside a number?

    I recomend you to use switch...case clause: for(int i=1; i<=12; i++) { cout << i << ' ', switch(i) { case 1: cout << "My first message\n"; break; case 2: …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in BlackJack 2.0

    Maazu: Sure, thanks. I must admit that I don't know how to use other characters than ASCI in a system independent mode. If you can write a post with this …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in C or C++

    Deceptikon: Let me say that C is a very good language. I think it is the second best language that exist. As a matter of fact I have been programming …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching C or C++

    I am familiar with java. but now i want to learn either of these. so which would be better to learn??
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in C or C++

    I recomend you to learn C++11 directly. Learning C is the long way to C++98 to C++03 to C++11 and do not have any benefit. As a matter of fact, …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in BlackJack 2.0

    Any comments?
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in BlackJack 2.0

    Lilgenski16: As you solved the problem and I think this could be a good example to show another style of programming, I am appending my own version (based on yours). …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching Does anyone know why this code gives me a segmentation Fault?

    http://pastesrc.com/view/JbIfLyTVbu I've been looking over the Web, but cannot seem to get it to work...
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in Does anyone know why this code gives me a segmentation Fault?

    You are making a some mistakes with pointers. Don't use `delete[] elemento` but `delete elemento` Don't use `delete[] prossimo` but `delete prossimo` You can not write something like `delete pun[i];` …
  • Member Avatar for Maritimo
    Maritimo

    Replied To a Post in BlackJack 2.0

    My recomendations are: You must write the << operators I don't think is a good idea to Derive `Deck` from `Hand` I recomend you to use the following hierarqui: Card …
  • Member Avatar for Maritimo
    Maritimo

    Began Watching BlackJack 2.0

    //BlackJack // Plays a simple version of the casino style game of blackjack; 1 - 7 players #include <iostream> #include <string> #include <vector> #include <algorithm> #include <ctime> using namespace std; …
  • Member Avatar for Maritimo
    Maritimo

    Stopped 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 heap short and heap tree about help me pls

    The program, which you will write, will be a console application of C++ and will read the file.txt file while separating the hidden countries and cities when it starts to …

The End.