49,757 Topics

Member Avatar for
Member Avatar for dirtydit27

Hello, I'm working on a homework problem for class. I have a text tab delimited file and each row has a orginal base, target base, and a number that is represented in the orginal base. The program should read this file and be able to convert the number from the …

Member Avatar for tinstaafl
0
248
Member Avatar for Labdabeta

This is more of a tale of "I think I broke it". Basically as an assignment for CS I have to write an assembler for a subset of the MIPS assembly language. Currently it is not working, getting a sigseg, so I decided to debug the code and step through …

Member Avatar for rubberman
0
305
Member Avatar for flony

Well, I do not find solution, if any help me would be great, here the code and where the error log is visual c + + 2012 // ver1.1.cpp: define el punto de entrada de la aplicación de consola. // #include "stdafx.h" /* examples/standalone_example_docs1.cpp */ /* Standard C++ includes */ …

Member Avatar for Ancient Dragon
0
179
Member Avatar for VUEKID

I have a set of data imputed into a set of arrays as the following: for (int i=0;getline(file,(cities[i]),',');i++) { getline(file, countries[i], ','); getline(file, latitudes[i], ',') ; getline(file, longitudes[i]); } How do I sort the array line of latitudes and longitudes without changing countries and city it is associated with?

Member Avatar for linux
0
180
Member Avatar for skyyadav
Member Avatar for Williams2222

I need to implement an interpolation search on a linked list, I have some code but I'm getting errors whenever I search anything that isn't the first element. Even if the element I'm searching for is in the list, if it isn't the first one it returns a -1. int …

Member Avatar for Ancient Dragon
0
813
Member Avatar for mating.basalo

[create a data file] [Appened Record] [Edit a Record] [Display a Single Record] [Browse all record] [Exit] program discription mini grading system w\ccompute your final grade. create a data file named studrec.txt accepts the ff. feilds info: ID no Last name First name mmiddle name Quizes and grades Q1 Q2 …

Member Avatar for nikita sen
0
161
Member Avatar for cambalinho

i want build 1 const with std::endl but by some reason isn't accepted:( #define NewLine std::endl i understand the '#define' isn't adviced to be used, but in these case i belive that i can't use the 'const':( what isn't right with that line? error message: "C:\Users\Joaquim\Documents\CodeBlocks\My Class\console.h|170|note: void Console::write(A, B …

Member Avatar for cambalinho
0
229
Member Avatar for jobtardisportal

Friends please help me to made clear ideas about these topics which is better for todays trend c++ or SAP...

Member Avatar for Assembly Guy
-1
145
Member Avatar for cambalinho

i have 1 class: class class1 { void Created(); calss1() { Created(); } } class1; void class1::Created() { cout << "hello"; } imagine that i don't write: void class1::Created() { cout << "hello"; } i get an error. i try these too: class class1 { void Created() { //do nothing …

Member Avatar for cambalinho
0
194
Member Avatar for mixelplik

Please, I know this is a simple question. I'm copying this code out of my text book, almost ver-mother#&$(ing-batm And it mother#&$(ing refueses, REFUSES to open the mother#&$(ing file and write to the mother#&$(ing array. WTF - Sorry for the language, but this is so stupid and silly and I …

Member Avatar for mixelplik
0
189
Member Avatar for Jugottabe

Hey guys, slightly less noob programmer here for a some more help, This week in class we were assigned to create a phonebook with a couple functions to manipulate it, but it seems I am having a couple problems. It seems to me that I have most of the program …

Member Avatar for DeanMSands3
0
225
Member Avatar for Oliver_1

So I'm using GCC. I downloaded MinGW base tools and g++ compiler from the installer, and wrote a basic "hello world" program. The source code is as followed: #include <iostream> int main() { std::cout << "Solidum petit in profundis!\n"; return 0; } I saved this as Motto.cpp. I went into …

Member Avatar for Ancient Dragon
0
186
Member Avatar for nathan.pavlovsky

Hello Programmers! How can I throw an exception if an unsigned int variable overcomes a limit (that is set by myself). I want the exception to terminate all processes. Thanks!

Member Avatar for phorce
0
122
Member Avatar for laklaker

string str; int k=0, count = 0,namelength, size,j=0; char name[80]; char extract[80]; char reversing[80]; cout << "Enter word or enter 'Q' to quit." << endl; cout << ">>"; cin.get(name,80); size =strlen(name); int q=0; for(int i=0;i<=size;i++){ if(isalnum(name[i])){ name[q]=name[i]; q++; }else{ name[i]= '\0'; } cout << name[i]; /*line start here when removing …

Member Avatar for phorce
0
243
Member Avatar for kyle.mace.35

Okay so I have fstreams that I swap between output and input. Is there anyway I can tell which openmode the fstream is in?

Member Avatar for deceptikon
0
177
Member Avatar for H_beginner

The maximum size of my array is 20 but I want the array to display only items that have been entered. I dont want the zeros to be considered in the array in all my operations like sorting and printing etc. Can anyone help. #include<iostream> #include<iomanip> using namespace std; void …

Member Avatar for Banfa
0
451
Member Avatar for thomasbeecher

I have completed this project for my Computer Science I class. I received full credit because the program is functional with no issues at a glance. However, upon testing the program again (after it was graded), I found that under specific circumstances an infinite loop occurs. I couldn't go on …

Member Avatar for NathanOliver
0
756
Member Avatar for rookieNeedsHelp

I have running totals of int minutes and int seconds and I can display them as mmm:sss, but I need to convert them into hh:mm:ss. Any ideas? Thanks in advance for your help.

Member Avatar for rookieNeedsHelp
0
364
Member Avatar for charming-_-eyes

Hello ,,, Please I need Your Help as soon As Possible.. I have an array of integers and i need to convert it to string ... PlZ Help me as soon as Possible ...

Member Avatar for Satya Raj
0
500
Member Avatar for rookieNeedsHelp

How can I convert a string into an integer? I tried this: totalMins += atoi(MovieRecord->getMinutes()); Which I think only works for C-strings, and I tried this: totalMins += static_cast<int>(MovieRecord->getMinutes()); which I think only works for converting an int to a double or something similar.

Member Avatar for rookieNeedsHelp
0
260
Member Avatar for Xakzi

Hello peeps! I need some help to decrypt my text file and make it able to read in my program.. What I have programmed so far is to read the encrypted file, create a new file, decrypt it and read the newly created file.. I need to decrypt the encrypted …

Member Avatar for Ancient Dragon
0
456
Member Avatar for sarah.mathieson.7

I have two function in the same class. In the first function I return a value, and I need to use this value in another function. I am returning by value. double Loan::monthlyPayment(double anAmount, double anInterestRate, int term){ double payment = ((anAmount * anInterestRate ) * ((anInterestRate +1)/((anInterestRate +1)*exp(term)-1))); return …

Member Avatar for sarah.mathieson.7
0
235
Member Avatar for skyyadav

I have to write a program in which i have to remove from a string another string if it found. for ex "I am going to school" and second string is "cho" i have to remove cho from first. the output should be "I am going to sol" need help

Member Avatar for tinstaafl
0
142
Member Avatar for programer.cpp

hi, i'm new C++ programer .i wanna find a way to change process name in task manager when it start(example: proc.exe to changed.exe in task manager) tnx for our attention and answers, your new friend Tjsdeveloper.

Member Avatar for programer.cpp
0
3K
Member Avatar for Mathias_1

I'm trying to create a program where I can print output to my console application and entering test without being override. Is there anyway to accomplish this? Here is my simple code showing my issue: ` #include <iostream> #include <thread> #include <Windows.h> void myThread() { while (1) { std::cout << …

0
164
Member Avatar for txhornsfan

I'm having problems with sending the input to another program... Here is what I'm supposed to do. Ask for nth number in the fibonacci sequence. The program will call another program (fibonacci.exe) genterate the nth number and pass back the information to the parent process, and display all numbers of …

Member Avatar for Ancient Dragon
0
209
Member Avatar for Xakzi

Hello! I am working on a small decryption / encryption program using Win32 Console Application c++ nothing big, here is my code: #include "stdafx.h" #include <iostream> #include <fstream> #include <conio.h> #include <stdio.h> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { char name[100],target[100],ch,mod; //Declare Variables unsigned char apostrophe; int num[100],i,option; …

Member Avatar for kill-it
0
352
Member Avatar for VBOI

Help in a loop to reloop and convert the prices and prices2 of those houses in the array to a double??????? [code]for (int i=0;getline(file,(house[i]),',');i++) { getline(file, cars[i], ','); getline(file, price[i], ',') ; getline(file, price2[i]); if(input == house[i]) { for(int i=0; ) ?????<<<<<<<<<<<<<<--Help here. } [/code]

Member Avatar for Moschops
0
114
Member Avatar for fashxfreak

I need to write a C++ program to analyze three different data files, and try to confirm Benford’s law.I need to create a console application that opens each file, counts the number of values that start with ‘1’, ‘2’, ‘3’, etc., and then outputs the percentages of each digit. Based …

Member Avatar for fashxfreak
0
682

The End.