
please wait
by stephcat5
Segmentation Fault, Dynamic 2d Array Part2
|
I've found what part of my code is causing the segmentation fault but I don't know why. Can anyone help to fix and explain? The program is a version of lang... |
Oct 6, 2019 at 9:20pm
[5 replies] Last: The values I've been testing are Board size: 10 rows, 10 columns xRow... (by stephcat5)
|
by lexa19
Insert user input into mysql
|
Hi! I have this piece of code, I want to write the user input into db. The problem is that the variables are of multiple types, int and strings. What am I doing... |
Oct 6, 2019 at 9:11pm
[4 replies] Last: the database insert statement should work exactly like it would in a s... (by jonnin)
|
How to prevent the latter function from being called twice |
In my visual tictactoe game, I check for a win like so: void HelloWorld::CheckWin(int x, int y) { Check3PiecesForMatch(0, 0, 1, 0, 2, 0); Check3PiecesFor... |
Oct 6, 2019 at 8:16pm
[5 replies] Last: Thanks @jonnin , and Glad to have your 5500th post :D (by closed account E8A4Nwbp)
|
by MazeStuck
Someone who can correct my code, please
|
#include<iostream> #include<fstream> #include<conio.h> #include<iomanip> using namespace std; struct Student{ char surname ; }; void seeStud... |
Oct 6, 2019 at 7:57pm
[7 replies] Last: Hello MazeStuck, This should help to get you started: /* 1)Given a ... (by Handy Andy)
|
Looking for some advice on that piece of software to create |
Hello, I need to create a piece of software that includes a data structure and a search function, but I am really struggling for ideas. I am only in my 1st year... |
Oct 6, 2019 at 7:47pm
[3 replies] Last: Thanks I will look into these options (by MyOnlinePersona)
|
Bubble sort with random array |
Hey so I am writing a program that sorts a randomly generated list five different ways (bubbleArray, selectionArray, insertionArray, quickArray, and mergeArray)... |
Oct 6, 2019 at 7:35pm
[2 replies] Last: So I am trying to take it piece by piece and here is how I am trying t... (by CodingIsHard17)
|
by XboxOne2019
Reading secret messages
|
Instructions: A local company is developing a way to pass multiple messages to multiple places at the same time. It is one of those secret companies. You are ... |
Oct 6, 2019 at 6:58pm
[6 replies] Last: For anyone that needs help. I got it working. Just have to clean some ... (by XboxOne2019)
|
by CodeNovice01
Bar Graph Manipulation assistance
|
Here is my code for population growth. The output is nearly perfect, I just need the '*' to be beside the date and then endline to the next year. As well as, di... |
Oct 6, 2019 at 6:30pm
[1 reply] : #include <iostream> #include <fstream> #include <sstream> #include <i... (by lastchance)
|
C++ E0413 I want pushback with a Pointer |
Hi i have problem with my code. I want use pushBack with a Pointer. But when i use it E0413 appears. How i can fix this. I dont want use vector beac... |
Oct 6, 2019 at 3:53pm
[3 replies] Last: > I dont want use vector beacuse its destroys everthing. > I can^'t us... (by salem c)
|
by maryt
time complexity of recursive function
|
Hello. I would like to ask the time complexity of this function. Can you please provide a method of calculating the complexity? int guesswhat(int n, int... |
Oct 6, 2019 at 2:24pm
[3 replies] Last: you are welcome. Even if the loop changed N, the answer is the same ... (by jonnin)
|
by lost110
Time complexity of matrix addition
|
Implement the addition of 2x2 matrix in c++ and then give the asymptotic running time in O notation of it.(Note: Implementation should not be hardcoded and also... |
Oct 6, 2019 at 2:07pm
[3 replies] Last: matrix addition is O(N) where N = rows*cols or its N*N if you consider... (by jonnin)
|
Unexpected answer |
The answer is ZERO 0. Why. Please explain #include <stdio.h> int main() { int p=100,q=5,r=50; int m; m = p == (q+r); printf("%d",m); ... |
Oct 6, 2019 at 1:19pm
[3 replies] Last: Thank you (by Beginner of C)
|
by CraigAB69
Looking for libg++ library
|
Hi, I was going to have a go at updating some old code, and I wanted to make sure that the original coder didn't make some changes to the original libg++ fil... |
Oct 6, 2019 at 8:24am
[2 replies] Last: Thank you, I really appreciate that. (by CraigAB69)
|
by aceadams
cout not printing full string?
|
Why does this code only return ss, as opposed to sss? int main () { string s="ss"; s ='s'; cout<<s; } |
Oct 6, 2019 at 5:18am
[3 replies] Last: is probably ok due to small string / other general luck that the cla... (by jonnin)
|
by advancedip
array of class member functions
|
Can someone help me? #include <iostream> using namespace std; class a { public: void function(){ cout << "hi" << endl; } void... |
Oct 6, 2019 at 4:41am
[1 reply] : #include <cstdio> #include <functional> #include <array> struct a {... (by mbozzi)
|
by stephcat5
Segmentation Fault, Dynamic 2d Array
|
Hello, I'm trying to initialize my dynamic 2d array (a gameboard) to blank or '_' or something along those lines. However, no matter what character I put in my ... |
Oct 6, 2019 at 4:27am
[1 reply] : > board = '_'; You probably want your loop variables her... (by salem c)
|
C++Tutorial for Beginners 34 - Overloading Constructors (Following this tutorial) |
I'm following cave programmers tutorial in which in cpp file visor.cpp it shows me an error with Visor::Visor(string newName) and upon compilation it shows me a... |
Oct 6, 2019 at 12:43am
[1 reply] : what is the error? (by malibor)
|
by stephcat5
Passing Pointer as Parameter
|
Long story short, I'm doing a version of Langton's ant for a class. It's the first time I've had to really split up code (assignment requires it) so I'm passing... |
Oct 5, 2019 at 11:56pm
[4 replies] Last: Heh, here’s a Tcl/Tk script to play with it. https://www.activestat... (by Duthomhas)
|
by kwaifu
Get data using ifstream
|
Hello. I'm trying to get the information from a .txt file and using it on this program. My problem is, that when it compiles, I get numbers like -85546484968 ... |
Oct 5, 2019 at 10:47pm
[8 replies] Last: OH ! I erased the ints from the line 63, and I added the '&' before a... (by kwaifu)
|
by Haley474
Multiple function use and returning a value from a function
|
I have to Write a function named inputVal() that prompts the user for an integer and uses a loop to validate it using the minimum given in the parameter set. Us... |
Oct 5, 2019 at 9:06pm
[6 replies] Last: Hi, I read the question again. The question says "prompts the user for... (by ray210618)
|