Beginners - February 2019 (Page 19)

by cash
random function problem
 
Why isn't my program giving me random numbers each time I print double random(unsigned long...
[5 replies] Last: put seed = rand() after srand call. seed is technically randomish bec... (by jonnin)
by ramp00
What does it mean when code builds successfully, but doesn't run
 
Hey! I have a problem with a program not running. What does it mean when the compiling works, but r...
[6 replies] Last: Hmm, yeah I see. Thanks guys! (by ramp00)
My code compiles but will not create output file:
 
I am using Visual Studio 2015. I check the directory after compiling the code and no txt file pops ...
[2 replies] Last: Thank you for that. Turns out all i had to do was change to ofstream (by iamyiyaj)
Constructor
 
I'm trying to make a text game like Zork and currently I'm trying to get a constructor to make a ran...
[2 replies] Last: Ohh, ok that makes sense, thank you very much. (by CaptainLupa)
Find coordinates of a rectangle by asking <= 7 queries
 
We are given a hidden rectangle. We can ask the computer a maximum of 7 queries and in each query, ...
[4 replies] Last: Please somebody help me in xor decomposition problem (by Dum)
by krz
I need help in solving an Array Based Expression Calculator
 
I am not understanding how I can print this array in the form that the question is asking. Please he...
[no replies]
Need help reading/sorting/writing data to and from a file.
 
Let me start by saying I know how to read from a file and write back to it, but I am having trouble ...
[15 replies] Last: I never considered the portability issue when using binary. I actually... (by closed account Ezyq4iN6)
issue with WM_GETTEXT and char buffers
 
Hi! I'm a chemist new to coding and am working on a script to help me automatically process some of ...
[no replies]
Problem with circular dependicies
 
Hello guys.I am trying to resolve one problem but i can'n.I have two classes: class FileSystemElemen...
[9 replies] Last: moving an include to the end of a file tickles my OCD I hear ya. Th... (by dhayden)
Reading numbers from a txt file
 
I am trying to create a function which: 1) Asks for a filename from the user 2) if it exists it tak...
[2 replies] Last: Hello John Davis, I loaded up your program and ran it. What I found:... (by Handy Andy)
The : in function definitions?
 
int addTwoNum(int a, int b) : (bunch of crap goes here) { return (a+b); } What is it c...
[4 replies] Last: Thank you for the quick replies. I will look into it. Thanks. (by Darkware)
2048 Game: How to overcome this bug?
 
I am testing it using: int main(){ std::vector<int> v{1,1,1,1}; bool c = game_over(v...
[7 replies] Last: Ah! I have solved it thank you. (by John Davis)
Arithmetic Progression Using recursion C++
 
I wrote c++ code which gets first character of progression (a1) difference (b) and size of progressi...
[5 replies] Last: #include<iostream> using namespace std; void arth( int a, int b, int... (by lastchance)
Help answer a problem
 
Write a C++ program that defines a function that prints every “x” character in the string. a....
[2 replies] Last: Create a function that takes as its arguments the string and the incre... (by lastchance)
structure and function
 
I am using structure and function combination to print data in the console, but I am not successful,...
[3 replies] Last: cin>>d1.u_star ; Grid is equal to 5 and you which means that your ... (by H00G0)
by Bopaki
I need some help on this function definition
 
I am trying to compile a file personType.cpp and I get this error when compiling operator= here is ...
[7 replies] Last: next code candidateTypeImp #include <iostream> #include <string> ... (by Bopaki)
by yat89
Insert value at the beginning and the end of 2d vector
 
Hi everyone. I am new to c++ programming. Given a task to insert zero at the beginning and the end o...
[2 replies] Last: Thanks Peter87 . Its work after I insert route and remove vector<... (by yat89)
Function not showing any output
 
Dear friends Can some one tell me why am I not able to print the simple output in the single fun...
[2 replies] Last: @dutch Thanks (by usmannazir)
Default Constructor
 
...
[3 replies] Last: I would do something like this: class date { public: en... (by JLBorges)
OpenGL: Best way to precisely copy pixels of an image to screen?
 
Hi, I am attempting to write a simple 3D OpenGL 3.1 engine (older spec targeted for retro gaming rig...
[3 replies] Last: Its been a WHILE since I did gl, but I do believe it was 2 triangles. ... (by jonnin)
February 2019 Pages: 1... 1718192021... 23
  Archived months: [jan2019] [mar2019]

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