49,756 Topics
![]() | |
Ikd what the error is telling me as when it compiles, no red lines appear. Plz help me >_< ! thanx in advance #include "stdafx.h" #include <iostream> #include <stdlib.h> using namespace std; #include "Shapes.h" #include "ShapeFeatures.h" int main() cout << "\n\n\n"; return 0; } //Shapes.h #pragma once class Shapes { … | |
I'm guessing the error lies in the writeBinary function where I open the file everytime I write into it. I am not sure how to create the file and have it not overwrite the existing data. My code results into reading 3, 3, 3 instead of 1,2,3. #include <string> #include … | |
I wrote a function that is supposed to crop a 2d vector starting at point r, c. The rectangle from there should have rows rows and cols columns. void pgm_crop( vector <IVec> p, int r, int c, int rows, int cols ) { int count = 0; //first count variable … | |
i down loaded 24 c++ programs from the MIT ( Massachusets institute of technology) web site. when i compiled the programs all the programs are giving the same warning messages " functions containing for, while, switch are not expanded inline". if i remove the word inline from the programs will … | |
Can anyone tell me how to calculate yesterday's date using c++? | |
Hello My Turbo C/C++ 4.0 was working properly in my Windows 7 64-bit but from two days i am not be able to use keyboard in Turbo C. I can't type any text. But mouse is working. Tried with DOS BOX Turbo C3, reinstalled it many times but could not … | |
Hi guys. Well according to the research I had, and MP3 file structure is as follows: ` AAAAAAAA AAABBCCD EEEEFFGH IIJJKLMM ` which is refered to as frames, and each. Each letter is one bit. I've seen samples demonstrating how to get data from this but what I want is … | |
If I made a program, and I wanted a random number. I know it's not compleatly possible, since it takes numbers out of the ram. Although there must be worse and better ways to do this. What are the better ways do do it. | |
| |
Hello guys, I found this C# article in daniweb forum and now I want rewrite the class described on the below link in C++ using WinSock64 lib but I'm newer in C++ programming and would like to have any idea to initiate the task. follows the link: https://www.daniweb.com/programming/software-development/code/422291/user-friendly-asynchronous-event-driven-tcp-client Best regards. | |
I'm having a lot of issues wring codes in C++ specialy when 3 files are required (.h, .cpp and main.cpp). Very different to C that it was very easy for me but not now with C++. I nee to write a program to do the following: Create 3 files for … | |
#include<iostream.h> #include<conio.h> class twonum { private : int x,y; public: void getvalues() { cout<<"enter any two numbers"; cin>>x>>y; } void putvalues() { cout<<"\n\n"<<x<<","<<y; } int add(int x,int y) { return(x+y); } int multiply(int x,int y) { return(x*y); } void swap(int x,int y) { int c; c=x; x=y; y=c; cout<<x<<","<<y; }; … | |
I want to generate a list of passwords of a cretain length passwords from a packet FILE. The packet file means a .txt FILE which contains more than 1M passwords of certain lengths. I want to store password of DIFFERENT length in a various .txt FILES /*this code is used … | |
Dev-C++ v 4.9.9.2 IDE When I compile and run my program as a console project, a window flashes very briefly on the screen and disappears. The compile log says compilation was successful and execution terminated. How to I keep the window (my output window?) from disappearing? | |
Why wont the if look for both Peter and John? #include <iostream> #include <string> using namespace std; int main() { string Name, Mood; // obvious string cout << "Whats your name?" << endl; cin >> Name; if (Name == "Peter"|| "John") { cout << "Hello, master! How are we feeling … | |
im using http://cpp.sh/ as my ide. but clrscr() and gotoxy() is not working since conio is not recognize...is there any header file that supports this codes? please help..thanks #include <iostream> #include<conio> using namespace std; int main() { clrscr(); gotoxy(5,10);cout<<"HELLO WORLD"; } | |
I'm trying to write a basic program for a C++ lab for class, and running into some trouble. Senario is that the program averages grades. A user enters the number of grades, then enteres a letter grade, then the program runs for however many grades the user has, then averages … | |
int* poly = new int[lines.size()]; for(int i=0;i<lines.size();i++)poly[i] = - 1; int curPoly = 0; vector<vector<cv::Point2f> > corners; for (int i = 0; i < lines.size(); i++) { for (int j = i+1; j < lines.size(); j++) { cv::Point2f pt = computeIntersect(lines[i], lines[j]); if (pt.x >= 0 && pt.y >= 0&&pt.x<img2.size().width&&pt.y<img2.size().height){ … | |
I need save each word of text file into array of strings I have this code how to do for convert into dinamically #include <stdio.h> #include <conio.h> #define MAX_CHARS 20 typedef char string[MAX_CHARS+1]; // leave one space for '\0' main(){ int i; string array[4]; FILE *data; data = fopen("ard.txt","r"); for(i … | |
Hi i am new to cpp i have created a win32 project in visual studio but i need to read a xml file with ms xml the xml file <game> <id="g"> <name>gta</name> <ver>1</ver> </id> <id="x"> <name>mta</name> <ver>5</ver> </id> </game> please answer | |
Hello, I've been in the process of teaching myself C++, going through different tutorials and like. Anyway I was working on a fibonacci sequence program - I looked through the practice problems here and decided to do them all from beginner on upward. I thought I had it working only … | |
How should I concatenate the characters read from a file with fgetc to determine if it is a number, keyword or an identifier? The problem is that, for example, the number 555 must be one and 5 and 5 and 5 as words must be jose and not character by … | |
Create a C++ program that uses Structures/Unions/Enum/Typedef to collect employee records/data (ID, Name, Date of Birth, qualification...), calculate Age using a function for 5 employee and display the full record for each employee. | |
Hi, I need to make sure my integer variable doesn't store more than 2 bytes. Usually i am writing programme on Linux machine where integer size is 4 byte. Each byte can take the values 0 through 255 (=2^8-1). So, two bytes can take the values 255*255=65535, so would it … | |
#include <iostream> #include <cstdlib> #include <new> using namespace std; void memwarning(); void* operator new(size_t, int); void operator delete(void*); int main() { char*p = new('$')char[100]; //Query 4b cout<<endl<<"First allocation: p = " <<hex<<long(p)<<endl; // Query 1 for(int i=0;i<100;i++) cout<<p[i]; cout<<endl; delete p;// Query 2 p=new('*')char[64000u]; // Query 3 delete p; return … | |
Hye I'm new to c++ language. Can anyone suggest me what is the best programming software should I learn ? And how I'm gonna learn coding ? | |
Hi Guys. First of all is it possible to detect a file copying/moving within the system, I'm sure this is done in lower languages like C++ but I've tried searching but I don't seem to find not even en example, maybe it because I don't know how it correctly called. … | |
I have a program that runs a bank management.It saves the created accounts in account.dat. For example these are the contents of the data file: 1001 felisilda s 5000 0002 smith s 3000 1212 johnson c 3200 I want the output to be sorted increasingly based on the bank account … | |
Where do I start creating a face recognition program? I am a beginner in the programing world who only knows little about c++. What do need to consider or what I have in place. I am running of windows pc and using devc++ and Mingw compilers. | |
Hi Dw. If there is anyone who knows how and which languagies are used to develop software's like word processing, Excel, Access, basically things like Office suite. I know Linux has their own different tools for office, as well as Microsoft as well and other OS have different Suites for … |
The End.