Beginners - April 2016 (Page 5)

Signed char question
 
Q: How can I input and output a negative character value. I know there are three types of character values: char, unsigned char (0 to 255), and signed char (-12...
[11 replies] Last: You mean ASCII 7 bit table, right? Yes i meant 7 bit ASCII table. ... (by mwaddell)
Open file and close file not working
 
I added some test code for my openfile function and my closefile function and they are not reading back anything. Obvious this is why my file isn't being opene...
[6 replies] Last: Yes, I already mentioned that. The local variable within the function ... (by Chervil)
extracting container type from template argument
 
Hi, I'm wondering if there is a way to rewrite this code that's using 3 template parameters template< typename ELEM, typename ALLOC, template<typenam...
[4 replies] Last: Cool, yea if I think about it now this makes sense. Tnx a lot man for ... (by etrusks)
Program that display "leap year" if it is and "not leap year" if it is not
 
TAKE NOTE THIS IS DONE WITHOUT USING THE MODULO OPERATOR. Is this even possible? Thanks for all the help here is what i have so far. if (year/4*4==year) {...
[2 replies] Last: https://in.answers.yahoo.com/question/index?qid=20090527222823AAUweX... (by lynlyn9)
How To Set Up A Hash For Ints?
 
I have to create a hash for a set of ints. The hash function which I need to use is this: f(x) = k * x % TableSize. I know I definitely need 4 loops,...
[no replies]
Calculation Problem
 
Suppose you own a soft drink distributorship that sells Coca-Cola, Pepsi, Sprite, and Fanta. You are required to write a menu-driven program to handle the trans...
[1 reply] : line 10: price is an uninitialized (garbage) variable. line 11: sel... (by AbstractionAnon)
thread does not name a type
 
Hi I am trying to create a thread: #include <thread> using namespace std; void f(); thread t1 {f}; However, I get the following error: ...
[8 replies] Last: Right, so have a go at searching for your version of minGW and std::th... (by TheIdeasMan)
Question regarding audio files
 
Hey guys, I made a small game in C++ (console game) which includes several sound effects. How can I zip the file and send it to someone else in a way that they ...
[3 replies] Last: Or you have them in a certain path on your computer? Can you show some... (by jgg2002)
Seive Sundaram MUCH faster than Eratosthenes?
 
So I implemented these two seives to test out which is faster, and was very surprised to find that the seive of sundaram is insanely faster than eratosthenes. I...
[14 replies] Last: Cache locality: Effect of spacial cache locality: #include <iostrea... (by JLBorges)
overloading operator- Still need help
 
I have to make a overloading operator- in my program, I know how to make a overloading operator++ and -- but I don't know how to make + and -. Can someone help ...
[4 replies] Last: Sorry, did you change anything? Can you tell me what you change? What... (by coder777)
reading file into a structure array
 
Im trying to read my file into this structure array and I'm getting an error when using getline {no matching function for call to get line}?? the elements inclu...
[3 replies] Last: Try this: void readfile (element elements , const int SIZE) { ifst... (by Thomas1965)
Need help with assignment but teacher is out of town
 
Explain why each of the declarations in the second list are wrong. 1. boolean gameOver = false; int students=50, classes=3; double sales_tax; short number...
[2 replies] Last: @ OP: Take a look at your notes; furthermore, take a look at this link... (by chicofeo)
What should i do next?
 
I just finished a course in c++ at my local college and I don't know what to build. I did very well in the class and have made a simple tic tac toe game, roster...
[1 reply] : That depends on your interests. You should definitely learn using exte... (by coder777)
by HI281
Separating Modules
 
I separated my program into modules but I got a D on the assignment. Can someone show me what I did wrong? If I can fix it I can resubmit. =============...
[10 replies] Last: do you mean the #include <string> and #include<array>? No, I mean the... (by coder777)
How do I write math equations in java?
 
a=sqrt x^5-6/4
[1 reply] : A simple websearch suggests: http://www.functionx.com/java/Lesson17.ht... (by keskiverto)
2D Array HELP
 
I am new to C++ and i am working on making an array and i am having trouble wrapping my head around the for loops. If you can help explain why we use them in si...
[2 replies] Last: Im not sure what you mean. (by fivestar)
IDE with API or Game Engine for C++?
 
IDE with API: I need an IDE like Visual Studio, but it to have the ability to create cross-platform (or) Windows applications. GUI applications to be specifi...
[1 reply] : For those who are also looking, GDevelop I've already taken a gander a... (by VenHayz)
Arrays
 
Having an issue with this code. I am having issues when a user enters the choice 3 to find the time of a skier. It only shows Heidi's name and does not let you...
[1 reply] : First, make your code more readable, and use brackets for loops involv... (by Cody0023)
'Expression must have bool type' error?
 
I was prompted to make 'state' a string variable but I can't work out this problem on my own. char homeownerStatus; char y, Y; string state; dou...
[2 replies] Last: It's an old assignment and I had cobbled my code together from the res... (by kerokeropretty)
How do I dynamically allocate and deallocate a 2d array?
 
I don't understand what dynamic or allocation mean. I'm good at producing code that works, but I suck at understanding the vocabulary of what my professor wants...
[1 reply] : It doesn't. Did you google for "Dynamic allocation C++", or anything s... (by MatthewRock)
April 2016 Pages: 1... 34567... 43
  Archived months: [mar2016] [may2016]

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