General C++ Programming - May 2015 (Page 13)

List is posting the right info but wrong names.
 
Hello I am trying to finish this program for a class moving lists to different files and such. i have gotten a majority of it done but the final part is messing...
[1 reply] : I have no idea what I'm doing. Try this. int main() { ifstream Input... (by Momothegreat)
c++ program..please help me to solve this
 
Q. Write a program that performs the following operations on strings: • Use a function count(char ) to count the number of no. of vowels (uppercase & lowerca...
[1 reply] : This program should be pretty easy to write if you can use the <cctype... (by Momothegreat)
string length in do while
 
//my first programming project #include <iostream> #include <string> using namespace std; int main () { string thanos, ultron; do ...
[10 replies] Last: //my first programming project #include <iostream> #include <string> ... (by toasterstrudel)
rand() function
 
I'm coding for a basic snake game I've commented the line of error. What I want to do is if the 'S' and the '*' are in the same place, move the '*' to a differe...
[3 replies] Last: this is my whole code is basically a very simple snake game the code a... (by ArtisticMess)
Looking for means to set terminal text color of std::cerr
 
I'm currently looking for a way to print messages from std::cerr to the terminal in red in order to draw attention to the user that an error has occurred while ...
[6 replies] Last: The attribute is a bit map, so you just mask it. Note I'm switching c... (by andywestken)
Import excel to datagridview
 
Hi, I need to import excel data to a datagridview, without using interop, because it only works when excel is installed in computer. I searched and found ou...
[3 replies] Last: OK, just checking. If you're using C++/CLI then you can base your cod... (by andywestken)
Getting Runtime error
 
Here is the link for the complete code http://ideone.com/AY0eEP The main problem is with calling getReportedEmployees() function. On CodeBlocks I am getti...
[1 reply] : > Employee *emp6 = new Employee; http://www.cplusplus.com/forum/gene... (by ne555)
GRADE BOOK PROGRAM FOR FINAL DUE ON THURSDAY PLEASE HELP
 
Create a gradebook program that allows the user to create a new class with a specified number of students, read student names & ids into the program from a file...
[4 replies] Last: If you want somebody to do your class assignments, that falls under ac... (by guatemala007)
random int 0 and 1
 
Hi all. I'm kinda new in programming, actually I'm a student. I just want to know how to randomize and obtain 0 or 1. I DID THIS, BUT ALL I GET IS A 10x8 M...
[5 replies] Last: BTW, matr =rand() % +2; is legal, just awkward. (by dhayden)
I need Help With My Class Object
 
I don't Know Why The Result Is correct for the subtraction -= and wrong for sum += Need Help #include<iostream> using namespace std; class compl...
[6 replies] Last: the += or -= operator are used to modify an object You could reset m... (by Gamer2015)
Whats wrong with my code?
 
Whenever i input "sqrt", "divisors", "factorial", or "triangle" it asks me for two numbers! Any help would be greatly appreciated. Here is the code. // /...
[1 reply] : Your if statements don't really specify what the condition needs to be... (by closed account 2LzbRXSz)
by nadjil
converting string to int
 
Hallo, I am new in C++. I want to convert string to ing. I got string bpm60 or bpm120. I want to read only 60 and 120 as int. I though of using this: a...
[4 replies] Last: Are you trying to make your code work for both 60bpm and bpm60 or just... (by jlb)
JNI, accessing a string returned from Java in C++
 
Hi guys, I've made some progress in my program, the basic function is to extract text from online articles using a Java library called Boilerpipe, but I've got...
[4 replies] Last: I assume you also freed the Java string and its associated UTF chars a... (by andywestken)
by Doombb
saving data to file in array format
 
Hi I apologize in advance I am a newbie to posting and c++. I am writing a program to analyze data for a physics experiment; we will have an array that has abo...
[1 reply] : First of all, use the code tags to format your code next time: It's mu... (by koothkeeper)
faster execution time?
 
I was somehow practicing c++ after a long time ( learning some high school physics and JS these days ) when I tried to sort a array in ascending order. I came...
[3 replies] Last: Thanks @JLBorges (by shadder)
Prime number additon to get specific value
 
x has to be greater than 2 and even. #include <iostream> #include <cstdlib> using namespace std; int main() { int p1 = 1, p2 = 1, t1 = 0, t2 = 0, x...
[2 replies] Last: My i variable in the for loop doesnt increment past 5 for some reason ... (by HumbleAAT)
Linked List copy constructor PROGRAM CRASHING
 
My program is compiling but it crashes when executing this and I cannot figure out what the problem is. Any help?? Thank you! #ifndef LINKEDLIST_H #define L...
[10 replies] Last: calm down, analyse it, write some pseudocode, make sure it is correct,... (by ne555)
dynamic memory management (arrays)
 
if I created an array dynamically and want to delete it. Is this correct? int size = 5; int *myarray = new int ; delete myarray; I imagine that I ha...
[1 reply] : I imagine that I have to iterate through each element and delete them... (by kempofighter)
by Won
Vector of struct erase
 
Helo! I'm working on a program and I came across with a weird problem. I created a struct with a string and an int. Then I made a vector with the type struct. ...
[7 replies] Last: I just thought I mention it in case it was what caused the problem in ... (by Peter87)
overloading operator[] to return an lvalue in myBitset class.
 
I've recently used std::bitset<size_t> for the 1st time. I used it to make a sieve of Eratosthenes on for finding prime numbers. Of course I wondered, how to r...
[3 replies] Last: Implementation improving! Instead of a myBit instance for each myBitse... (by closed account D80DSL3A)
May 2015 Pages: 1... 1112131415... 22
  Archived months: [apr2015] [jun2015]

This is an archived page. To post a new message, go to the current page.