Linked Questions
2,350 questions linked to/from What is a debugger and how can it help me diagnose problems?
1
vote
2
answers
8k
views
How to return a pointer to a string in C [duplicate]
I tried to develop a function which take a string reverse letters and return pointer to string.
char *reverseStr(char s[])
{
printf("Initial string is: %s\n", s);
int cCounter = 0;
char *...
3
votes
4
answers
11k
views
Written CSV file writes only one cell per row [duplicate]
I've written a Java class to generate CSV file :
public class CSVGenerator {
private static String REFERRAL_HEADER = "Position,Mail,Invitations,Qualified invitations";
private static String ...
-1
votes
2
answers
4k
views
LetterE in java with Asterisk [duplicate]
For this class assignment I need to make a program print the letter E like this:
***
*
***
*
***
I need to make this using nested loops. Here is what I have so far;
public class LetterE
{
public ...
-5
votes
2
answers
4k
views
C++ Why the void function is not working eventhough I called it? [duplicate]
I do not know how to use the debugger and I think thad I do not have one
So I am trying to create simply linked list in c++ Called Product
this list will be used to store product...
and I have ...
-2
votes
3
answers
1k
views
Infinite Loop When Using Function Return Value as a Statement [duplicate]
Was making a small code for a text based game but i tried to do thinks a bit different than the tutorial sort of to test my understanding but i tried to get a function value to make a do while ...
2
votes
2
answers
2k
views
How to see the beginning of the stack trace for a StackOverflowError [duplicate]
I am investigating a StackOverflowError that a Java application is producing. The stack trace looks like this (sorry, I can't share the actual production trace):
at test.StackOverflowTest.foo(...
0
votes
1
answer
3k
views
Fileinputstream NullPointerException Java [duplicate]
I searched for this error on StackOverflow but any topic seens to solve my problem. I have this code that opens a .txt file and inicialize objects variables and this error appears.
public void ...
0
votes
4
answers
2k
views
Printing Stack of Arrays [duplicate]
Some operation is performed on an array in function fillStackWithArray() and after the operation the array is pushed into the stack and is repeated again.
But the issue occurs when I try to print the ...
0
votes
2
answers
779
views
How to fix an StackOverflow Error of a Binary Tree implementation? [duplicate]
This is an example of a Binary Tree implementation here.
This code works ok.
But can I create the root as single one-time node in add method.
Instead of
public void add(int value) {
root = ...
-1
votes
2
answers
955
views
Printing pattern a pattern in java [duplicate]
I tried to print the below pattern in java
***1***
**2*2**
*3*3*3*
4*4*4*4
like this way
public class Sample {
public static void main(String[] args) {
int m, n;
Scanner s = ...
1
vote
1
answer
2k
views
Print stars according to the integers in an Array - Java [duplicate]
In this exercise I had to write a method to print stars according to the integers of an array. I have finally got my code to pass, but I did not understand exactly why. The initial value of the ...
-3
votes
1
answer
1k
views
Counting palindromes [duplicate]
The question was:
A contest closes in n days hh hours, mm minutes and ss seconds. Given two values of n, how many palindromes of the format nhhmmss would we find in the indicated interval?
Example 1
...
-2
votes
1
answer
1k
views
I'm trying to store and manage ordered pairs in the form (x,y). As in coordinates in an array using an inner class [duplicate]
I want to be able to store and manage ordered pairs of the
form: (x, y). To solve this problem I created two classes: EuclideanSpace and Point. This is a homework assignment and so it is set up with ...
0
votes
2
answers
1k
views
How to move each element of an array one position to the left? [duplicate]
I'm a rookie programmer, and I want to swap every element from this array one step to left, but when I write this code, there is no result, where is the wrong?
char[] S = {'h', 'R', 'i', 'y' , 'a' ...
-2
votes
1
answer
1k
views
Issues figuring out how to fix C++ Blackjack program [duplicate]
I'm currently trying to make a simple Blackjack program that is single player and only has cards from 1-10. The issue that I'm having is that whenever I ask for a new card for the third time, it doesn'...