General C++ Programming - December 2017 (Page 11)

by SCB3
Writing a container class
 
I Keep getting this error: Unhandled exception thrown: write access violation. this->**data** was 0x1110112. occurred but unsure why, Header File: ...
[7 replies] Last: > Where am I going out od bounds btw, I cant see where I fix that part... (by ne555)
by hmay
stuck in a loop please help
 
So I'm writing a program in C++ and for this function I am reading in the coefficient and exponent of terms in the polynomial. It compiles, but it never stops r...
[1 reply] : ¿what's your input? while(coeff == 0 && exp != 0) { cin.ignore... (by ne555)
Generating a random 4 character string and then cracking it
 
Hey, I'm just coming over to C++ from Python (where stuff like this is incomprehensibly simple) and am trying to figure out how to approach this problem. I wa...
[12 replies] Last: > #define NDEBUG // uncomment to trace the progress that should be ... (by ne555)
Help with arrays Calculating average c++
 
I have already written most of the codes. The only thing i am missing is calculating AVERAGE and SUM of the number in .txt file. numbers in the .txt file ar...
[1 reply] : After the loop on line 33 you should use count not ARRAY_SIZE . ... (by coder777)
Read in data file!
 
Need Help Reading in this data file! My output is a black screen! #include <iostream> #include <cctype> #include<stdio.h> #include<iterator> #include<fstream...
[1 reply] : Line 17: if (myReadFile.is_open()); The body of the if statement i... (by Chervil)
Caught Speeding
 
You are driving a little too fast, and a police officer stops you. Write code to compute the result. If speed is 60 or less, the output is no ticket. If speed i...
[3 replies] Last: Thanks Ganado! I had no idea what the hell I was doing! I appreciate t... (by kristal630)
by fraC19
Need help with clusters
 
Hi, I'm currently working on an assignment which I need to input a file like this: 1 2 3 4 0 2 3 0 1 3 //connection between two vertexes 0 1 2 0 0 3 4 5 ...
[no replies]
Need help with my game
 
I need help with my game, it's a console arcade game and it's the first game I ever coded. I only have 2 things left: 1.make enemy spawn every 10 seconds wit...
[2 replies] Last: 2) can be really simple or really hard. You can literally just copy ... (by jonnin)
Does each thread stay the same number when using openMP multiple times throughout program?
 
In the beginning of my program let's say I get the number of threads and assign an ID to them so I can easily assign each of them a task like this: #pragma o...
[1 reply] : myID will not exist the second time you enter a parallel block, becaus... (by helios)
strings anagrams(HELP)(Emergency)
 
ANYONE KNOW HOW TO WRITE THIS CODE? Two strings are anagrams of each other if one can be formed by rearranging the letters of the other (excluding spaces). ...
[1 reply] : Have you tried yourself already? If so, post your code and point out w... (by goldenchicken)
[Unspecified Crash] Move Semantics
 
Hello Community, I've been typing in the following example code from a book, which is shown in the following, demonstrating move semantics. It works up to th...
[3 replies] Last: Unfortunately the copy constructor was not the problem. But it is a... (by Chervil)
Pass a 2D vector to a function
 
Well, I decided to try and write a simple spreadsheet, so created a single cell first as a struct. struct Cell { string text; int number; // W...
[10 replies] Last: @Chervil Thank you. Oh, by the way, I haven't written instructions ye... (by whitenite1)
by YikUTM
Problems reading data into array
 
Assignment trouble The txt 94 49 96 67 82 34 91 64 15 97 98 78 Hong Kong 71 57 17 31 63 38 77 74 61 22 27 59 New York 36 16 30 19 29 41 23 25 22 37 28 29...
[9 replies] Last: #include <iostream> #include <string> #include <vector> #include <sst... (by JLBorges)
Delete Thread
 
XXXX
[3 replies] Last: There are better ways to address a situation towards people than with... (by YikUTM)
Search return
 
Thanks
[3 replies] Last: Please don't remove your question when you have the answer, this way, ... (by goldenchicken)
by EgorV
for for if
 
Hello, I found an error in the code and I do not know how to solve it, I hope for your goodwill. ____________________________ #includes... struct Addre...
[3 replies] Last: Don't be too hard on yourself lol. (by Ganado)
Help me figure this problem out please...
 
Hi, I've been sitting here for a while now thinking about a problem. It basically goes like this: You receive a number of building blocks, they have all got b...
[2 replies] Last: >This is a fun little exercise. I'll just give you a few hints. Thank... (by Kevsterking)
vectors
 
a.
[4 replies] Last: See http://en.cppreference.com/w/cpp/container/vector/vector example a... (by Ganado)
Super noobie question: its killing me:
 
Super noobie question: its killing me: std::cout<<"Rotate vector custom fx on x axis:"; print_vector(_vector_rotx); (causes l...
[1 reply] : You need to show more content. If print_vector() is not printing on th... (by jlb)
Program shutting down on it's own
 
#include <iostream> using namespace std; int main() { int I,V,R,a; cout<<"Select wether you would like to calculate R, I or V."<<endl; cout<<" "<<en...
[4 replies] Last: Read the thread I linked to. (by helios)
December 2017 Pages: 1... 910111213
  Archived months: [nov2017] [jan2018]

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