49,756 Topics

Member Avatar for
Member Avatar for Charizardly

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 { …

Member Avatar for AssertNull
0
354
Member Avatar for zzQwerty

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 …

Member Avatar for David W
0
436
Member Avatar for Saif_3

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 …

Member Avatar for AssertNull
0
572
Member Avatar for Vsrkprasad

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 …

Member Avatar for rproffitt
0
1K
Member Avatar for Jovanie_1
Member Avatar for deceptikon
0
3K
Member Avatar for Mayank_5

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 …

Member Avatar for deceptikon
0
1K
Member Avatar for Mr.M

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 …

Member Avatar for AssertNull
0
962
Member Avatar for Peter_36

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.

Member Avatar for AssertNull
0
262
Member Avatar for Ali_60
Member Avatar for happygeek
0
124
Member Avatar for washington_1

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.

0
123
Member Avatar for Luis_6

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 …

Member Avatar for ddanbe
0
661
Member Avatar for TĦɇ Ãðît

#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; }; …

Member Avatar for tinstaafl
0
297
Member Avatar for Wilda_1

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 …

Member Avatar for AssertNull
0
359
Member Avatar for rwkopcke

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?

Member Avatar for Mohit_12
0
6K
Member Avatar for Peter_36

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 …

Member Avatar for AssertNull
0
366
Member Avatar for lloydsbackyard

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"; }

Member Avatar for Dan_15
0
2K
Member Avatar for badkid32

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 …

Member Avatar for Xavier_3
0
11K
Member Avatar for tayeb d

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){ …

Member Avatar for rproffitt
0
993
Member Avatar for Jose_12

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 …

Member Avatar for AssertNull
0
690
Member Avatar for Simple man

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

Member Avatar for Simple man
0
815
Member Avatar for dyingatmidnight

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 …

Member Avatar for Jimmy_7
0
212
Member Avatar for Jose_12

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 …

Member Avatar for Jose_12
0
515
Member Avatar for Wabu_1

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.

Member Avatar for Reverend Jim
-1
59
Member Avatar for can-mohan

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 …

Member Avatar for AssertNull
0
403
Member Avatar for surfingturtle

#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 …

Member Avatar for surfingturtle
0
236
Member Avatar for Azim_1

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 ?

Member Avatar for rubberman
0
290
Member Avatar for Mr.M

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. …

Member Avatar for pritaeas
0
1K
Member Avatar for Ed Genes

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 …

Member Avatar for AssertNull
0
365
Member Avatar for Chisanga_1

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.

Member Avatar for Traevel
0
293
Member Avatar for Mr.M

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 …

Member Avatar for rubberman
0
193

The End.