Questions regarding homework assignments are more than welcome, provided that they: Briefly explain the problem you are trying to solve. Do not post your entire assignment verbatim. Explain what you have tried thus far and where you are stuck (preferably with code examples). Don't ask for ...
0
votes
2answers
20 views
execute less with execv?
I have the following c code. I want to display my file with less by calling execv()
however the following seems never work. The program terminates and noting pop out.
#include <stdlib.h>
...
0
votes
2answers
35 views
Dice program, need to either eliminate array or allow for dynamic array size
I'm almost done with a dice rolling program and my only issue is that I'm unable to input more than 5000 rolls, due to the size of the array I've specified. While I suppose I could simply increase the ...
1
vote
1answer
36 views
java assign next() to string or break into characters
Hey guys i am trying to create a program which will read a file and check whether the text is a palindrome or not. The code compiles, but doesnt really work. The problem is i dont know how to break a ...
4
votes
1answer
54 views
Algorithm to print to screen path(s) through a text maze
For my C++ assignment, I'm basically trying to search through a chunk of text in a text file (that's streamed to my vector 'vec') beginning at the second top character on the left. It's for a text ...
2
votes
1answer
37 views
Finding a way to handle colors and powers on a board game
I am creating a game for my school project, so I am not here for any kind of code, just a global idea on how to do what I am trying to do...
I have Pieces and each piece as is own color and Type like ...
1
vote
2answers
45 views
C++ console window won't stay on screen despite “cin.get();” or system(“pause”)
I want the console window that pops up whenever you run a C++ program to stay... but in my code here that's not happening. It just quickly vanishes. What's wrong? Note: I am new to C++.
For some ...
0
votes
0answers
27 views
need GPA and CGPA calculate code
i have some code but the code is missing some features.
1. if we selected box, and than the calculation
2. if we select value of yes on repeated course. how we calculate new
gpa and cgpa ?
...
2
votes
4answers
62 views
Substring Counting in Python and Adding 2 Numbers From One Line of Input
I'm following a python website for my schoolwork. It's really neat, it gives you tasks to complete and compiles the code in the browser.
Anyway, I came to a challenge that I'm not really sure how to ...
-2
votes
2answers
46 views
Struct Compile Time Error
I have written a program that catches signals and then outputs a list, but I have one compile-time error that I can't seem to get past. I keep receiving this error:
"cannot convert `void ()()' to ...
4
votes
1answer
55 views
Big O exponential: proving NP is a subset
Is O(2^(n^c)) = O(n^c*(2^(n^c))), where c is some constant?
The context for this is showing that NP is a subset of DTIME(2^n^c) for all c > 1.
-6
votes
0answers
46 views
Student Timetable algorithm in PHP
I created a timetable but it doesn't show the conflicting courses.
Mysql table name: timetable
Attributes: courseid,time
//
I take this image from my created page.
//Before these codes a set ...
0
votes
1answer
15 views
Prolog determinacy - grouping facts
I have a fact set as so...
fav_fruit(male, young, apple).
fav_fruit(female, young, bannana).
fav_fruit(male, old, bannana).
fav_fruit(female, old, apple).
fav_fruit(female, young, apple).
I'm need ...
1
vote
6answers
88 views
Get the sum of an array in C# but receiving int32 error
In general, I know that int.32 errors mean that a string value is not getting converted for the console program. I have seen a lot of code trying to find the answer to this including the following ...
1
vote
1answer
43 views
Implementation of shell like feature within C program using unix system calls
Can someone please suggest what is wrong with this program.I am trying to implement shell like feature by creating a child process here. On giving a command having single word like "ls" or "pwd" it ...
-1
votes
4answers
73 views
Array but with 16 digits
Now I know that just putting an array with 16 digits is too much for arrays and it will give an answer but for a cybersecurity class I wish to gain access to routers around my neighborhood (for ...