-
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 … -
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 … -
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; … -
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() … -
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... -
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); … -
Stopped Watching dynamic object arry
how to create dynamic object array with over loaded constructor call plz help and tell me the syntax ... -
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; … -
Stopped Watching header files
The purpose of header files is soley to satisfy the compiler? -
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 … -
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 … -
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 … -
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 … -
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 … -
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. -
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 … -
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 … -
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 … -
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 … -
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 … -
Replied To a Post in How to find zero used in given number?
The same question had been asked on C++ forum. -
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)); … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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)` -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 << … -
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: … -
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 … -
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 … -
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?? -
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, … -
Replied To a Post in BlackJack 2.0
Any comments? -
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). … -
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... -
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];` … -
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 … -
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; … -
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 … -
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.