Beginners - June 2020 (Page 8)

by Toby09
Reading txt file with semicolon and colon into array
 
Hi, so i have the assignment that i am doing,but i am stuck because i do not know how to separately read separated elements from file to array. This is the firs...
[4 replies] Last: ok, so this is a code i recently did. Its the only one i have that wor... (by Toby09)
C++ get char of array with loop
 
Hello, How can I get char of array with for loop? I don't want to use a pointer and the length of the string doesn't fix. Thanks int main() { ...
[1 reply] : char myArray ; This creates an array of 100 chars, each char with no ... (by Ganado)
What's the noun to describe the behavior <Some class>?
 
I saw one line code, but I don't know how to describe the behavior. void visit_values(btree_path const &path, node_ref<ValueTraits> const &n) { ...
[1 reply] : n is the name of the second argument to the function. node_ref<Val... (by MikeyBoy)
How can i improve my code and make it more readable as well as maintainable(3 months on and off with C++)
 
Write your question here. #include"Fitness.h" float Fitness::CalculateMacroRatio(float calories, float carbperc, float fatperc, float protienperc) { fl...
[3 replies] Last: With the current code I really don't see the reason for the class sinc... (by jlb)
by Mif
How can I fix these errors ?
 
I get these 2 errors: ||=== Build: Debug in ProjectName (compiler: GNU GCC Compiler) ===| ||warning: 256: 170: 4105: duplicate value| ||warning: 256: 290: ...
[11 replies] Last: Ah, gotcha. That makes sense. (by MikeyBoy)
by giup33
list c++
 
Hi! I was trying to write a program which takes in input a list of points of the plane and two integers m and q (that represent the line y=mx+q) and that should...
[1 reply] : #include <iostream> #include <list> using namespace std; struct PT{ ... (by lastchance)
by yin
How would you suggest I merge these programs?
 
So i have three ncurses programs (each one has a main, a cpp and a few header files and text files) and one oop (with text files and one main). This is the i...
[5 replies] Last: Also here -> https://www.dreamincode.net/forums/topic/419469-how-do-i-... (by salem c)
Assembly
 
Hello, I hope everyone is safe and healthy during everything that has been happening over the last few months. I've started back with courses, I'm enrolled ...
[2 replies] Last: there are forums for each, eg masm has several forums and a following ... (by jonnin)
Decimal Place Problem
 
Hi, I am doing C++ exercises in a beginners text-book on C++. The chapter I am up to has to do with control structures (if, else if). Anyway one of the exercis...
[2 replies] Last: don't overthink it. its probably something simple like this that they... (by jonnin)
it work in devC++, but application don't work
 
Hello there, I'm new with C++, I have a program in C++ that runs fine in devC++ using compile&run feature, but when I click to that application, it works not ri...
[3 replies] Last: Dừng hoàn thiện (ví dụ: bằng cách yêu cầu người dùng... (by againtry)
by alexas
How to take vector from class
 
Hello, I have classes: Polymer::Polymer() : _monomers(std::vector<Monomer>()) So I have created several Polymer objects , let's say p1, p2...
[5 replies] Last: Thank you for your help. If I want to compare the monomers of the poly... (by alexas)
by Winer
problems with ./a.exe
 
I've just started learning c++ and I am currently watching a youtube series on how to progress, I am having problems with g++ filename.cpp and ./a.exe when I ...
[4 replies] Last: Don't forget to press 'Save' in your editor as well. Forgetting to sa... (by salem c)
copy 2d vector into new 2d vector
 
Hi everyone.. I'm new to C++.. I'm here seeking for some advise.. I got a problem in copying 2d vector (populationP) into new 2d vector (populationP1_shortR). H...
[4 replies] Last: Thank you everyone for your advise. Really appreciated it :) (by sarah1993)
by momof4
Alternate arrow keys
 
I'm trying to create a two player game. I have the arrow keys controlling one player, (GLUT_KEY_UP etc.) and those work just fine, but I cannot get the other ke...
[1 reply] : Without code, it's impossible to tell what the issue could be. Is this... (by zapshe)
How to keep string literals "u8"
 
...
[8 replies] Last: @jonnin, @coder777, @malibor Thanks very much, and sorry for the delay... (by cppstuff)
by bld
What is necessary to include?
 
I want to make simple programs with C++ (mainly input/output based programs) what do I need to include? Is iostream enough, or do I have to include something el...
[6 replies] Last: Thanks a lot for the help! (by bld)
by nickg
Partition Groups
 
I am new to C++ and am attempting to apply some simple codes that run well in Matlab to C++. In the case here, I create a vector of n (here 1000) uniform random...
[6 replies] Last: Thank you all very much. This is very helpful, including the construct... (by nickg)
C++ to Pseudocode
 
I need help turning this code to pseudocode. I need to get this done as soon as possible so any help is appreciated. file: main.cpp #include <iostream> ...
[13 replies] Last: It depends on what your prof wants, but I'd do it at a higher level. A... (by dhayden)
ERROR C2677 binary == no global operator found
 
ERROR MESSAGE: C2677 binary "==" no global operator found which takes type 'const_Ty'(or there is no acceptable conversion) #include <iostream> #include <...
[2 replies] Last: Got it! Thanks (by clairexia123)
by ericM
compute the average execution time for a function
 
hello, I wrote a simple function in a c++ program which I call several times in a program run. I implemented it both in serial and parallel (using openMP)...
[1 reply] : first thing is to not run your function in a tight loop. The CPU/OS /... (by jonnin)
June 2020 Pages: 1... 678910... 12
  Archived months: [may2020] [jul2020]

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