General C++ Programming - April 2017 (Page 3)

by Bbolt
Reading last line of txt file and inputting it to variable
 
Hi, I've recently put together a program and have had some difficulties. What I want the program to do is spit out every 8 letter word possible (upper and lowe...
[2 replies] Last: So Test.txt has to have some order. You need to read the last line of... (by SamuelAdams)
by Gosu
3 spot game
 
Hello guys , i wanna a make the 3 spot game on C++ and i have some difficulties so may somoene help me please. Thanks
[1 reply] : Sure, post your code (by SamuelAdams)
hello ,I want a C ++ project that includes all functions
 
hi,I want a C ++ project that includes all functions
[1 reply] : C ++ project that includes all functions all functions from where? t... (by gunnerfunner)
How do I call out this function?
 
//Prototype int readRainFall (ifstream& inFileName, double rainfalls , int MONTHS); //define input int readRainFall (ifstream& inFile, double rainfalls...
[1 reply] : Rather than using a c-style array you could read the file into std::ve... (by gunnerfunner)
by Kalcor
2D array addresses
 
Uhm why does looping a 2D array to print it but only using one dimension prints the addresses inside the array instead? Like int main() { cin >> n >> m;...
[3 replies] Last: As cobbi said, matrix is an array which means it's a pointer to the a... (by benhart)
Linked List and Input/Output Problems
 
I am having problems with a program that is supposed to take a list of data from an external .txt file, which the user inputs the name of the file, creates a li...
[6 replies] Last: You need to pick a format for the file that is easy to read and easy t... (by dhayden)
by Kalcor
Logical error
 
After winning gold and silver in IOI 2014, Akshat and Malvika want to have some fun. Now they are playing a game on a grid made of n horizontal and m vertical ...
[5 replies] Last: I don't really know how to better explain it than that. What that me... (by Kalcor)
c++ codeblocks function program help
 
Hello, I need big help with this program because I simply cannot figure out why it won't work properly. This is the assignment my professor wants us to do: U...
[12 replies] Last: Usually she tells us when she wants to do call by reference or not. In... (by Abrogna22)
2D arrays as well as switch
 
I cannot seem to get my switch to display the function it calls in each case. Any suggestions on the mini and maxi? This has to be the minimum number and the ma...
[2 replies] Last: @zoran404 after I have adjusted this issue how should I proceed to mak... (by vstexpert)
grammar
 
does this context free grammar produce the correct result S--> aSb|A|B A--> aA|a B--> bB|bb thi...
[no replies]
the woe and lo but lol
 
this is definitely woe and lo. but lol apparently my text file has a character c such that isupper(c) will scream "assertion failed (c >=-1 && c <=255)" s...
[5 replies] Last: It is also in the ASCII Table: http://www.asciitable.com/ That table... (by Cubbi)
Survey on C++
 
Hi C++ devs. I am working on my thesis. If you can fill out soon this survey on C++  I would be really thankful: https://goo.gl/forms/8Hpz2Wr8sidVPk6e2
[no replies]
C++17 executable size
 
So I have written some code that uses C++17 filesystem, and am dismayed at the size of the executable. I use the compile option -Os (Min Size Release)and link w...
[6 replies] Last: Glad that helped. Maybe once the filesystem library gets integrated i... (by mbozzi)
by katchy
Sort an Matrix and remember old index
 
Hello :) I have this Matrix: 0 11.80 79.34 78.23 11.80 0 65.23 45.19 79.34 65.23 0 90.27 78.23 45.19 90.27 0 I must sort each line ...
[2 replies] Last: #include <iostream> #include <utility> #include <algorithm> #include ... (by JLBorges)
Help: Name Generator (txt files)
 
Objective: I want to create a program that will output 10 random full names (and have it be different every time the program is run) Info: I have a file wi...
[2 replies] Last: Sorry, I thought it might be better to have it moved here (by armysargent8)
by hades
Storing strings in an array into a vector
 
How can you store a string into a vector from an array of strings? For example, I have an array (string myarray ) and a vector<string> myVector. I figure the p...
[2 replies] Last: Consider moving instead of copying if the array elements are not requi... (by gunnerfunner)
by Kalcor
Passing 2D arrays to functions
 
Can someone show a way to pass a 2D array to a function without knowing both of the dimensions? And explaining why please <3
[1 reply] : Array size is part of array type, so to pass it to a function, you hav... (by Cubbi)
by ss99
Creating a Calculator
 
Hello I am trying to create a type of calculator in my webpage that is sort of like a GPA calculator but a bit different. I am not sure how exactly to explai...
[6 replies] Last: Okay sweet alright. I am trying to use that but I'm running into troub... (by ss99)
spectrum and oscillation frequency of a vector
 
I'm trying to get the spectrum and oscillation frequency of a pixel vector (motion of a point in a video). The vector data (file.txt) is organized as follows...
[1 reply] : Not sure exactly what you want - there isn't a single "frequency" in y... (by lastchance)
OpenGL: Interesting game - one problem
 
#include <iostream> #include <GL/freeglut.h> #include <GL/glut.h> #include <ctime> #include <cmath> #include <cstdlib> #include <vector> using namespace...
[4 replies] Last: Thank you both. It works as intended. (by HumbleAAT)
April 2017 Pages: 12345... 16
  Archived months: [mar2017] [may2017]

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