49,761 Topics

Member Avatar for
Member Avatar for misstj555

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 …

Member Avatar for misstj555
1
925
Member Avatar for IdontevenKNOw

// 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; …

Member Avatar for rproffitt
0
518
Member Avatar for Leomar_1

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 …

Member Avatar for DGPickett
0
282
Member Avatar for misstj555

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 …

Member Avatar for DGPickett
0
1K
Member Avatar for Perry Winkel

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 for rproffitt
1
665
Member Avatar for rjrajbir

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 …

Member Avatar for rproffitt
0
415
Member Avatar for matt21mcr

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 …

Member Avatar for Reverend Jim
0
623
Member Avatar for namra

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 …

Member Avatar for Jawad_9
0
8K
Member Avatar for mister-fett

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

Member Avatar for Jawad_9
0
1K
Member Avatar for xyrena

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 …

0
184
Member Avatar for pevin

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 for tinstaafl
0
227
Member Avatar for coljam

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 …

0
178
Member Avatar for einnosys

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

Member Avatar for rproffitt
0
172
Member Avatar for kosunsanya
Member Avatar for DaniWebUser_1

I've recently started learning C and I have a simple program that I can't get to work. (I'm pretty sure C++ and C are similar enough at the basic level not to cause any problems in this forum). I've tried it by substituting the scanf("%s", myName) captured string data with …

Member Avatar for rproffitt
0
1K
Member Avatar for Pierce_1
Member Avatar for kg16w

Hey guys! I got super behind in my C++ class and I feel like I dont really know what I am doing. I've been trying to piece together from other examples of password coding, but I got a little lost in the sauce. Anyways, the requirements for this program is …

Member Avatar for rproffitt
0
423
Member Avatar for Detsibli

I am a student learning, I was tasked with the following; > Create a class called AddressBook. Create the address book with a dynamic array and when the object is created, the programmer should specify the maximum number of items in the addressbook. (e.g.) AddressBook myAddressBook(20); It should contain a …

0
295
Member Avatar for zdreggs

Hello, I am trying to understand how to use C-style strings in C++. My goal is to store a C-style strings into a string type array. If I pass "This is a test" into word_token, it displays: This Is A test So from here I believe my setup is almost …

Member Avatar for rproffitt
0
259
Member Avatar for BirdaoGwra

Hi, I am getting an error while making a vector. frame.h #include <wx/wx.h> class Frame : public wxPanel { public: Frame(wxPanel* parent, int xx, int yy); ~Frame(); private: int x; int y; } frame.cpp #include "frame.h" Frame::Frame(wxPanel* parent, int xx, int yy) :wxPanel(parent) { x = xx; y = yy; …

0
842
Member Avatar for WatchingSafe

Here is the input file. 12345 67890 I want 123 in array1. I want 678 in array2. int array1[10], array2[10]; int n, i=0; ifstream x; x.open("input.txt", ios::in) while( (!x.eof()) || (i<3) ) { x >> n; array1[i] = n; i++; } //here should be the command for next line i …

Member Avatar for rproffitt
0
162
Member Avatar for ImmutableIcarus

I'm still stuck on this one question, can someone help me with this? 4.) Write a program that asks the user to type positive integers. When the user types a negative value the program writes ERROR and asks for another value. When the user types -1 that means that the …

Member Avatar for rproffitt
0
302
Member Avatar for ImmutableIcarus

Thank you in advance for anyone who is willing to help me. Can someone give me the answers and briefly explain what you did? I have been stuck and frustrated with these questions for about a week now, so I'm asking for help. There are two questions that I need …

Member Avatar for Reverend Jim
0
426
Member Avatar for kimmy2467

new to programming. everytime i try ti comppile this program i get an error message saying expected unqualified... here is the code and the question that the code was made from Write a program that uses a loop to print the numbers from 10 to 20. int main(); int crt …

Member Avatar for nullptr
0
219
Member Avatar for kimmy2467

im new to programming. every time I try to compile my programs I get the message saying "expected unqualified id before '{' token. heres an example: int main() #include <stdio.h> int a, b; printf("Enter the first value:"); scanf("%d", &a); printf("Enter the second value:"); scanf("%d", &b); a = b + (a++) …

Member Avatar for rproffitt
0
206
Member Avatar for Nick_31

Hello, I am stuck on how to exactly do this problem if anyone could offer me any help with either a worked out solution or just some pseudocode that would be great. Here are the rules and information about the assignment below. Assignment: What is The Game of life? Not …

Member Avatar for JamesCherrill
0
457
Member Avatar for ImmutableIcarus

Write a Program that asks the user to input a positive integer. If the user inputs a negative number, program should output "ERROR" and ask for /the user's input again. If the user inputs the value of 0, the program says "NO AVERAGE". If the user inputs a -1, the …

Member Avatar for Reverend Jim
0
352
Member Avatar for Nick_31

Hello, I am stuck on where to go with this assignment for checking if the sliding puzzle is solved right or wrong. I will include the context of the assignment so you can see what needs to be included. If you could just share some code or pseudocode to get …

Member Avatar for rproffitt
0
432
Member Avatar for jimmichaels29

analyze the problem. walkthrough the code. I would like to charge for this solution $10 to Renewal Computer Services, if I may post here (kids & teens free). when -50 is reached, doesn't blow past the maxvalue+1U and cause a cpu-hogging forever loop, it doesn't actually reach -50 equivalent (UINTMAX-49). …

0
186
Member Avatar for Meno_1

#include<stdio.h> #include <iostream> #include<stdlib.h> using namespace std; int main() string custname,carmodel,carnum; int days=0,rentalfee=0; cout << "Sila isi nama anda : "; cin >> custname; cout<<endl; do{ cout<< "Sila berikan pilihan model kereta pilihan anda !"<<endl; cout<<"Tekan A untuk model Axia."<<endl; cout<<"Tekan B untuk model Saga."<<endl; cout<<"Tekan C untuk model Exora."<<endl; …

Member Avatar for ravss
0
267

The End.