General C++ Programming - March 2018 (Page 4)

returning the stored value of greatest difference from ite neighbors
 
im having trouble implementing this http://www.cplusplus.com/reference/numeric/adjacent_difference/ to find the largest number compared to its numbers in a vect...
[7 replies] Last: You are getting closer, but is a sum (s) same as minimum (m)? v p n ... (by keskiverto)
My float variable gets erased when defined in constructor.
 
What the program does: My programs prints out a/multiple rectangle(s)/squar(s) defined by the user's input of width, height, and ammount. The program can also g...
[2 replies] Last: @lastchance Thank you so much! (by laquishabonquiquithe3rd)
How to set a date format in c++?
 
Hi all, I am doing a school c++ project. I don't know how to solve one requirement which is the date that is entered by a user must be in this YYYYMMDD format...
[2 replies] Last: Thanks. (by KenrickG)
Trouble connecting main.cpp, BoxClass.h, BoxClass.cpp
 
I created a basic consol program that creates a box of the users desired height and width. I wanted to learn how classes worked so I just used one file. Now i'm...
[3 replies] Last: @ne555 @whitenite1 Thank you both so much that fixed everything. (by laquishabonquiquithe3rd)
RIFFA linux driver c coding question
 
Regarding https://github.com/KastnerRG/riffa/issues/30#issuecomment-373602633 , how do I rewrite this code segments https://github.com/KastnerRG/riffa/blob/mast...
[1 reply] : For data loopback as in https://github.com/KastnerRG/riffa/blob/master... (by user123random)
by Mk87
binary digit matrix implementation by using 2D vector
 
How I can implement the following matrix by using just 2D vector (not matrix,...) in C++? 0 0 0 1 1 1 1 0 1 1 0 0 1 1 1 0 1 0 1 0 1 Above matrix is just a...
[5 replies] Last: Pehaps this isn't my business, but that wasn't aggressive. Try readin... (by mbozzi)
Need to get my program to print multiple names
 
I can get the program to print out one name but I need it to be able to print out duplicates. Any help is always appreciated. #include "stdafx.h" #i...
[7 replies] Last: Now are you going to answer my question? Which question? How to pri... (by keskiverto)
ARRAY PRACTICE
 
I am supposed to write a program that uses two parallel arrays, one of which is an array that contains the "type of salsas" and the other contains the amount of...
[3 replies] Last: Or if you don't want to swap around a bunch of strings, you can have a... (by zaphraud)
Standard Library set_difference
 
Hello, I am having difficulty with std::set_difference; struct data { int element1; int element2; }; vector<data> data1(6), data2(6), data3(6); ...
[7 replies] Last: Hello, I wish to find the set_difference between two vector containe... (by closed account S879Nwbp)
Template Problems
 
I got 3 classes: Game Loader RawModel in the loader class, I've got a function declaration: template<int i> RawModel loadToVao(float (&positions) ); ...
[5 replies] Last: yes, sir you are right, it should be i/3. I was stupid, i guess, becau... (by hassanAman)
I need some help on an array lab.
 
I have a c++ program lab that needs to be done. It is to prompt the user for the month they were born in number such as 1, 2, … 12. Use this number as a subs...
[5 replies] Last: 1. do loops suck. use while alone. Use whichever loop makes sense. I... (by dhayden)
sorting vectors into 3 categories
 
i need to sort the elements i have into 3 other vectors the program will prompt the user for a number the elements in vectdata that is smaller than the number...
[5 replies] Last: Thank you so much For same I figured the error when I put = instead o... (by Candyfloss)
How to take in integers into a 3x5 array and double it?
 
I am new to C++ and I've written many programs! My favorite is one where it displays all prime numbers from 1 to x. Anyways, I had a very stupid question. I'...
[5 replies] Last: No major suggestions except ... keep it up! It's nicely laid out. (M... (by lastchance)
Debug Help
 
h
[5 replies] Last: Hi, So what about the reply I made yesterday? http://www.cplusplus.c... (by TheIdeasMan)
by piotr5
is the standard explicitly demanding short to be implicitly cast to int?
 
why do I get a warning in the code below, both gcc and clang?!?! is there a way to overload operator+(short,short)? same problem with char instead of short! ...
[4 replies] Last: I wonder if the alignas specifier would work? Edit: Maybe in conjunc... (by TheIdeasMan)
by binzel
Wondering if anyone could help me with this.
 
So im new to C++ and know C#. But i need help with something. I need to Get the bytes of a .net exe file aka c# file Then execute them in unmanaged c++ into me...
[6 replies] Last: I need to Get the bytes of a .net exe file... Execute the bytes into ... (by dhayden)
Help? Stacks Program using Vector Class
 
Currently I'm working on a program, but I'm not sure how to utilize the variable to be used as an identifier and be displayed and compared to another variable...
[3 replies] Last: Line 6: Cars is undefined. I don't think you need it. All you need to ... (by dhayden)
by biwash
checksum validation
 
I am having issues to figure it out how can i do checksum for very large number such as having more than 45 digit long? i used assign long long but it can solve...
[7 replies] Last: ooh that's a lot more elegant, and makes the code more portable too. t... (by zaphraud)
Vector class functions
 
Is it possible to capture and store a data from the Vector class into another variable when calling the pop_back() function? If so, what's the best way to do...
[1 reply] : vector::pop_back() just deletes the last item. If you want access th... (by dhayden)
OpenGL
 
Hello! I really am fed up with the console look. I want to move to graphics to finally use the skills to create a game. I believe OpenGL is what I'm look...
[3 replies] Last: Alright, yeah if you want to be able to fine-tune the graphics with mo... (by Ganado)
March 2018 Pages: 123456... 15
  Archived months: [feb2018] [apr2018]

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