Hello, I have task to read the CSV file using C++ , the CSV file contains 10 rows x 3 colums float data and I want to read it and apply some mathematic and then the ouput should be stored in a new array.and the datatype required is double

Member Avatar
Member Avatar
+0 forum 1

write a c++ program in which you are required to devolpe a c++ program which encrypts the data of the user after entering his/her message in the character array the user will enter a number a new message will be generated by adding each letter to the number entered by the user

Member Avatar
Member Avatar
+0 forum 1

I am trying to write a C++ solution for a problem which is written C, I have learnt C++ very long ago(may be 15 years), and the way C++ is evolved now is kind of taking long to understand and not easy as 'C' to develop a solution. Would request any experts help in solving the problem . Actually, the problem is quite big , but i broke down into small , so i that i can reuse from learnings here. I have already started with a small class here to store a list of strings and print them. But …

Member Avatar
Member Avatar
+0 forum 1

i want to learn arrays in c++

Member Avatar
Member Avatar
-1 forum 3

I am working on a problem for which i have already developed a solution, but i am new to OPP prgramming and started learning recently. Would request OPP Gurus to provide suggestions for the better designs, keeping scalability, extendability of (course readability) in mind. Also,I would like to extend the the current program for mutiple random players and winner is decided based on max number of votes. But there are rules: 1)Currently i have 6 players, out of which any number of players might contest(taken from std::input or cmd args) 2)Contestants are not aware of other contestants. 3)Each contestant has …

Member Avatar
Member Avatar
+2 forum 1

Hi everyone, I'm new to parallel programming, and my project is the two-dimensional matrix vector multiplication using mpi in C programming language. I have this multiplication function, but I don't know exactly how to run it with mpi. Can you help me, please? I write these commands, $ mpicc -g -Wall -o matrix2d matrix2d.c -lm -c $ mpiexec ./matrix2d.c But I get some errors. `mpiexec was unable to launch the specified application as it could not access or execute an executable: Executable: ./matrix2d Node: ubuntu while attempting to start process rank 0.` 2D Matrix-Vector Multiplication Function is below: #include <stdio.h> …

Member Avatar
Member Avatar
+0 forum 1

can you help me add a write and read function to the program below #include <iostream> #include <conio.h> #include <windows.h> #include <stdio.h> #include <fstream> using namespace std; struct daerah { char kel[50]; char kec[50]; char kota[50]; }; struct data { int nomor; char nama[50]; char tinggi[20]; char status[20]; char pekerjaan[20]; char tempat[20]; char tanggal[20]; char almt[20]; char jenis[50]; daerah alamat; }; main() { int menu; int no_sim=-1,i,j; int pilih; int namedit; data sim[20]; char get[1]; bool ketemu; menuutama: system("cls"); cout<<" ---------------- Aplikasi Data Pelanggaran Lalu Lintas ---------------"; cout <<" \nMENU UTAMA :\n\n"; cout<<" 1.Menambah Data Pelanggaran\n\n"; cout<<" 2.Mencari Data Pelanggaran\n\n"; …

Member Avatar
Member Avatar
+0 forum 1

#include<iostream> #include<string> using namespace std; class stack { string item; int top; public: stack() { top=-1; } void push(char ch) { top++; item[top]=ch; } char pop() { char ele; if(isempty()) { printf("\n stack overflow!!"); return '@'; } ele=item[top]; top--; return ele; } char peep() { return(item[top]); } int isempty() { if(top==-1) return 1; return 0; } int priority(char ch) { if(ch==')') return 1; else if(ch=='+' || ch=='-') return 2; else if(ch=='*' || ch=='/') return 3; else return 4; } }; int main() { string infix,prefix; char ch,ch2,token,temp; int i,j=0,len; stack st; cout<<"enter the valid infix expression: "; cin>>infix; len=infix.size(); for(i=len-1;i>=0;i--) …

Member Avatar
Member Avatar
+0 forum 4

https://drive.google.com/file/d/1JTM--EiH_qQOJiyBoN3-Eem2TYTKvqfT/view?usp=drivesdk

Member Avatar
Member Avatar
+0 forum 1

I have a lecture is there anyone who can help me to change the source coding below to OOP C ++ I / O which uses #include <fstream> so that when the file is written can be saved and when the program is closed then we can still write the data back #include <iostream> #include <conio.h> #include <windows.h> #include<stdio.h> using namespace std; struct daerah { char kel[50]; char kec[50]; char kota[50]; }; struct data { int nomor; char nama[50]; char tinggi[20]; char status[20]; char pekerjaan[20]; char tempat[20]; char tanggal[20]; char almt[20]; char jenis[50]; daerah alamat; }; main() { int menu; …

Member Avatar
Member Avatar
+0 forum 2

I need someone help me in c++ Phone book project using linked list

Member Avatar
Member Avatar
+0 forum 1

Assume that you are the manager of a restaurant. Create an interactive program that allows you to manage the order from your customers and compute your daily sales. First create a text file that contains the menu of your restaurant. Arrange the menu such that the items are properly organized in different categories, for instance food, drinks and desserts. Your program should be able to read data from the input file. When the program started, the main menu should display the following options 1. Show the current order of the customer. If the order is empty, display ”Please select your …

Member Avatar
Member Avatar
+0 forum 2

while compiling this code i have got an error Declartion not allowed here its a C program title of the program is " LIBRARY MANAGEMENT" #include<stdio.h> #include<stdlib.h> #include<string.h> struct library { char bk_name[30]; char publisher[30]; float price; }; int main() { struct library l[100]; char pb_nm[30],bk_nm[30]; int i,j, keepcount; i=j=keepcount = 0; printf("\n\n## Library Management ##\n"); while(j!=5) { printf("\n1. Add book information\n"); printf("2. Display All Books Available \n"); printf("3. Display Highest Price Book\n"); printf("4. Display list of Publishers\n"); printf("5. Exit"); printf ("\n\nEnter one of the above : "); scanf("%d",&j); switch (j) { /* Add book */ case 1: printf ("Enter …

Member Avatar
Member Avatar
+0 forum 1

This is my code. #include "pch.h" #include <iostream> #include <Windows.h> #include <string> #include <ctime> #include <fstream> using namespace std; std::string AppName = "League of Legends"; LPCSTR LAppWindow = "Riot Client"; std::string AppStatus; bool IsAppAvil; bool Update; int main() { //Start App ShellExecuteA(NULL,"open","D:\\Games\\Riot Games\\League of Legends\\LeagueClient.exe\\",NULL,NULL, SW_SHOWDEFAULT); //Checking if app is running HWND hGameWindow = NULL; int timeSinceLAstUpdate = clock(); int AppAvailTMR = clock(); int onePressTMR = clock(); int Timer = 0; DWORD dwProcID = NULL; HANDLE hProcHandle = NULL; while(!GetAsyncKeyState(VK_ESCAPE)) { Timer += 1; if (clock() - AppAvailTMR > 100) { AppAvailTMR = clock(); IsAppAvil = false; hGameWindow = FindWindowA(NULL, …

Member Avatar
Member Avatar
+0 forum 3

Hi. I am attempting to make a GUI program as a personal project in C++ using visual studio. This is what the program does: If you run the program at 2:30pm, the program will check off a box that says "you are in hour two" (because the hour of the day in which you decide to run the program is in the 2th hour). If you run the program at 7:20am, the program will check off a box that says "you are in hour 7" (because the hour of the day in which you decide to run the program is …

Member Avatar
+0 forum 0

MyMainWindow::createUI() { label = new QLabel("foo"); button = new QPushButton("Browse"); connect(button, SIGNAL(clicked()), SLOT(browse())); layout = new QHorizontalLayout(); layout->addWidget(label); layout->addWidget(button); setLayout(layout); } void MyMainWindow::browse() { QString directory = QFileDialog::getExistingDirectory(this, tr("Find Files"), QDir::currentPath()); if (!directory.isEmpty()) { if (directoryComboBox->findText(directory) == -1) directoryComboBox->addItem(directory); directoryComboBox->setCurrentIndex(directoryComboBox->findText(directory)); } } MyMainWindow::createUI() { label = new QLabel("foo"); button = new QPushButton("Browse"); connect(button, SIGNAL(clicked()), SLOT(browse())); layout = new QHorizontalLayout(); layout->addWidget(label); layout->addWidget(button); setLayout(layout); } void MyMainWindow::browse() { QString directory = QFileDialog::getExistingDirectory(this, tr("Find Files"), QDir::currentPath()); if (!directory.isEmpty()) { if (directoryComboBox->findText(directory) == -1) directoryComboBox->addItem(directory); directoryComboBox->setCurrentIndex(directoryComboBox->findText(directory)); } }

Member Avatar
Member Avatar
+1 forum 1

Hi. I was trying to figure out how to read and write files in C++. To understand it better I wrote this code on "codepile.com": https://www.codepile.net/pile/WDPkzrep. What it does is it allows a user to create their own text file then write information in it. Lastly, the contents of the file will be read. The problem is that it will allow a user create a text file but will not allow them to type anything into the file. Also, because the program stops after the line that says "please enter text:" (keep in mind that the program will not allow …

Member Avatar
Member Avatar
+1 forum 6

// MajorProJectMB.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include<cstring> #include<fstream> #include<iostream> #include<string> #include <iomanip> #include <cstdlib> #include <string> using std::ifstream; using std::ofstream; using std::ios; using namespace std; struct project { char comma[10]; double NumFields[10]; string lastfieldName; string firstfieldName; double Toltal = 0; }; void getfile(project Fields[8]); void bubbleSort(project Fields[8], double NumFields[10]); void swap(double *xp, double *yp); void outputfile(project Fields[8]); int main() { project Fields[8]; getfile(Fields); outputfile(Fields); system("PAUSE"); return 0; } void getfile(project Fields[8]) { ifstream inStream; ofstream outStream; int count = 0; inStream.open("Project-Input.dat"); if (inStream.fail()) { cerr << "File not located!"; system("PAUSE"); …

Member Avatar
Member Avatar
+0 forum 9

hello, i'm newbie here and also in programming world. so I would to request help from pros here. my question is, how to print out number entered in random in ascending order WITHOUT USING ARRAY AND FUNCTION? let say the user key in 4, 56, 31, 90, 11 and the output would be 4, 11, 31, 56, 90. hope anyone would help me. thank you.

Member Avatar
Member Avatar
+0 forum 28

int hashKey(int key) { return key % tableSize; } void insertar(int key) { int index = hashKey(key); while (hashTable[index] != NULL) { hashTable[index] = key; index++; } } i'm trying to add values to this hash table array, but i"m having trouble trying to make it. I already initialized the hash table to NULL but i don't know how to add the values and validate that the space has already a value in it.

Member Avatar
Member Avatar
+0 forum 2

Hi. I wanted to create a GUI application with C++ as a personal project. I am using that because I have done a lot of GUI personal projects in Java but never in C++, so I want to try using a new coding language I learned. I don't know a lot about GUI with C++ (only header files and some library components of C++) so I decided to look up some information on how to do this in C++. However, when I go to look up information about non-editable radio buttons in C++ and more, I don't get a lot …

Member Avatar
Member Avatar
+0 forum 5

New to this site I would like to say hello. My main interest is programming in cpp and especially the use of the Standard Template Library and std:: stuff. More than willing to look into any questions from the community. Perry.

Member Avatar
Member Avatar
+1 forum 3

Hi, I am a newbie here, Recently I was working with H3LIS331DL 3-Axis Linear Accelerometer I²C Mini Module Here is code for the X, Y, Z-axis. #include <Wire.h> // H3LIS331DL I2C address is 0x18(24) #define Addr 0x18 void setup() { // Initialise I2C communication as MASTER Wire.begin(); // Initialise Serial Communication, set baud rate = 9600 Serial.begin(9600); // Start I2C Transmission Wire.beginTransmission(Addr); // Select control register 1 Wire.write(0x20); // Enable X, Y, Z axis, power on mode, data output rate 50Hz Wire.write(0x27); // Stop I2C Transmission Wire.endTransmission(); // Start I2C Transmission Wire.beginTransmission(Addr); // Select control register 4 Wire.write(0x23); // Set …

Member Avatar
Member Avatar
+0 forum 1

Hello everyone, I am writing this post again because there were ambiguities in the previous one. I need help with this task tomorrow. I will present what I have, what I got from you and ask which code is best to use to perform this task. I will start with the program I wrote to fill the 6x6 array with random numbers and display it on the console. The program displays random numbers stored in an array in the range of -5 to 64 ... I believe deeply that it contains no error. int x,y; int rand_tab[6][6]; int main() { …

Member Avatar
Member Avatar
+0 forum 5

i am new to c++ and m having a problem in making a scientific calculator plsss help me i dun know how to make the power function work here is my program m working in visual studio 2005 ,c++ getiing this error error C2064: term does not evaluate to a function taking 2 arguments [CODE]#include "stdafx.h" #include<iostream> #include<cmath> #include<conio.h> using namespace std; void sum(); void product(); void sub(); void div(); void remainder(); void square(); void cube(); void cos(); void sin(); void tan(); void cosh(); void sinh(); void tanh(); void acos(); void asin(); void atan(); void exp(); void log(); void log10(); …

Member Avatar
Member Avatar
+0 forum 6

I am new to C and C++, but I wrote this calculator in C++. It compiles okay on borland 5.5, and can do addition, subtraction, multiplication, and division of two numbers. If you type any characters except numbers, +,-,*,/,or e, there will be lots of beeping noises and error messages! Please post any ways I can improve this code or my programming in general! (Additions such as square roots, etc. will be appreciated) *****Planned changes: Add a constant for pi, add squared and square root, allow calculation of roman numerals.*****[code]/* Program: Fett Calculator File:C:\borland\bcc55\bin\cpp\calc Function: Calculator, very simple Author: Mister-Fett …

Member Avatar
Member Avatar
+0 forum 18

hello, I am trying to learn c++, and I am trying to run this program to display the correct answers in the end. the user will be asked to input their answers to the 20 questions on the list. for what I have read, I think I should be using some if or nested if statements? please help, thank you. Also, this is not my assignment (as I was accused of from other forum I tried), I am already working and just trying to learn programming on my spare time. thanks again, code is below. #include <stdio.h> #include <conio.h> #define …

Member Avatar
+0 forum 0

hai everyone im supposed to create a futsal reservation system which has 3 courts customer name should be shown in the booking table till now the customer name is printing on the table ...but i dont know how to save the name

Member Avatar
Member Avatar
+0 forum 1

I have a CSV file with a bunch of columns, but I only need the information for the 11th column. How do I read through each line and skip to the 11th column and then store those values in a vector? I'm struggling to find clear information on how to read files in c++. This is what I have so far: #include<iostream> #include<fstream> #include<vector> #include <sstream> #include <string> std::string readStock(std::string fileName){ std::vector<std::string> ticker; //create vector std::ifstream f(fileName, std::ios::in|std::ios:: binary|std::ios::ate); std::string finalString = ""; if(f.is_open()){ std::string str; std::getline(f,str); //skip the first row while(std::getline(f,str)){ //read each line std::istringstream s(str); //stringstream to parse …

Member Avatar
+0 forum 0

How to read .CFG file in c#, and make in object so we can modify using that object.

Member Avatar
Member Avatar
+0 forum 1

The End.