Beginners - April 2019 (Page 4)

Quick Tic Tac Toe Question
I have a quick question in regards to a program tic tac toe. How can I display Game over! when all the spots are taken. I'm not good with arrays yet and would l...
Apr 26, 2019 at 7:33pm
[4 replies] Last: char* tak2 = tak ; //collapse the board to 1-d for(i = 0; i < 9; i++) ... (by jonnin)
Can I put quotes in "if statements?"
Hello everyone! Right now, I was wondering if I could make a program where you have to enter a specific set of characters such as: Open And it would process ...
Apr 26, 2019 at 6:48pm
[3 replies] Last: The string does not contain a question mark. I was just taught to do t... (by BeastSlayer299)
by arg57
for loop is a bit off
The for loop seems a bit off. The user has 20 turns to find treasure when I enter the first direction it says I have 20 turns remaining shouldn't that be 19? I...
Apr 26, 2019 at 5:44pm
[4 replies] Last: Great Thanks Ganado that's what I wanted it to do appreciate it (by arg57)
Error list in VS
when I watch tutorials online of people coding in VS whenever they make an error it shows in the error list in real time. it updates as it finds errors. Mines o...
Apr 26, 2019 at 5:07pm
[7 replies] Last: I have been using VS for like, 1 1/2 years by now and I didn't know yo... (by Grand Master stickshift)
Iterate through each character in an array of strings
I have an array of strings (ex: string dna ) that is holding up to fifty 10 character strings. I am trying to compare each character of each string in the arra...
Apr 26, 2019 at 3:10pm
[3 replies] Last: Break the problem into smaller bits. On outer layer you have a list o... (by keskiverto)
How can I Convert number to another
I am Not Good in c++ When running code, convert 1 to 1 2 2 to 2 3 3 to 3 4 ...
Apr 26, 2019 at 2:41pm
[9 replies] Last: It seems that a,b,c,d,e have values that are in [1..NMAX], where NMAX ... (by keskiverto)
C26444 - Unnamed Objects Warning
In the 'Shader.cpp' file of my program, I get the C26444 warning - 'Avoid unnamed objects with custom construction and destruction.' on the line: GLCheck(&Sh...
Apr 26, 2019 at 1:45pm
[1 reply] : Grand Master stickshift said double click the error and tel... (by calioranged)
Accessing Functions from Other Files
I am having trouble accessing my 'GLCheck' function from outside the file it is defined within. If I put functions in separate .h file - 'Overload': I have to ...
Apr 26, 2019 at 9:28am
[2 replies] Last: Thanks dhayden (by calioranged)
by Demii
/openmp
Im writing a program that demonstrates /openmp configuration However the following code only outputs "Generating Numbers..." Could anyone help in any way? ...
Apr 26, 2019 at 7:58am
[3 replies] Last: As @Peter87 says, it's not instantaneous. However, it does seem to run... (by lastchance)
Having trouble with guessing number game.
I am using a stack and an array. The array is used to random shuffle the order, and then I put the elements of the array into the stack. Then the user has to gu...
Apr 26, 2019 at 7:22am
[3 replies] Last: Push the correct guesses onto a new stack. while ( !guess.empty() )... (by salem c)
Clear memory before return
If I have a function that creates allocates a memory dynamically in it, before returning a value should I free the memory or I can just return and it will free ...
Apr 26, 2019 at 1:50am
[1 reply] : At end all dynamically allocated memory should get freed. If the memor... (by nuderobmonkey)
can classes share variables
can classes share variables, for example class Example { void Reasons() { int I = 1; } } class OtherExample { void OtherReasons() { I = I + 2; } } obvio...
Apr 25, 2019 at 10:20pm
[10 replies] Last: Bro I already figured it out. What i meant by global was that I could ... (by Grand Master stickshift)
self teaching learning structure
so in my cpp journey, I have been self teaching. and for anyone else out there who is self taught you know how hard it is to learn without a structured course t...
Apr 25, 2019 at 8:35pm
[7 replies] Last: [quote=mbozzi] You should get a proper textbook as soon as possible. I... (by PiggiesGoSqueal)
by arg57
end program from function
I decided just to end the game, If they get it correct, they can move on to the next turn. If they do not get it correct after the second attempt, the game is...
Apr 25, 2019 at 6:26pm
[4 replies] Last: I did it used; system("pause"); exit (0); (by arg57)
by Medz
fileloop only outputs first line
Hello there. First time here. My test Data: ABC 8.0 8.0 8.0 8.0 8.0 0.0 0.0 8.75 DEF 10.0 10.0 10.0 10.0 10.0 0.0 0.0 9.75 GHI 8.0 10.0 6.0 10.0 9...
Apr 25, 2019 at 6:04pm
[2 replies] Last: oh! that fixed that issue. Thank you very much for your assistance. I... (by Medz)
How is a programming language written
I hear about the guy who made cpp, and I see game engines with their own personal scripting languages. I wanna know how a programming language is made.
Apr 25, 2019 at 5:54pm
[2 replies] Last: how a programming language is made Ask Mike Cowlishaw -- https://e... (by MikeStgt)
problem with logic operators
so this program is meant to work as an Evolution simulator. each neuron is taken through some changing process, for now they are just added to, and then whichev...
Apr 25, 2019 at 5:04pm
[8 replies] Last: cpp is not a smart boi is he XD this did fix the problem, thx. (by Grand Master stickshift)
by cash
DISTINCT INTEGERS
My program creates a vector of distinct random integers and prints the pairs that add up to user inputted size. However, the user should be able to enter a DIST...
Apr 25, 2019 at 4:46pm
[2 replies] Last: Hello cash, Sorry I almost missed this. If you want your output to lo... (by Handy Andy)
Why do people do use "this" a lot in classes for linked lists?
Please Note: This is for a homework assignment, however , I'm not asking you to do it for me. Instead, I'm asking for clarification on what "this" means and wh...
Apr 25, 2019 at 4:43pm
[2 replies] Last: [quote=keskiverto]Lets write a struct and a standalone function: ....... (by PiggiesGoSqueal)
struct issues
so i'm working on a program for my cs 1 class, on structs. i need to input names and grades from a text file then create a switch to offer different options. ...
Apr 25, 2019 at 4:34pm
[1 reply] : if (s .test_score >= 90) s .grade = 'A'; { float avg = 0; for (... (by Konstantin2)
April 2019 Pages: 123456... 24
  Archived months: [mar2019] [may2019]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.