General C++ Programming - April 2014 (Page 13)

Dynamic array resize function problems
 
NOTE: I am aware that it would be easier to just use the STL Vector, however, for a programming class that I'm in, we are required to write our own dynamic arra...
[4 replies] Last: I see. So the push_back probably used the used variable to write ... (by cire)
Why does program terminate?
 
Writing a program to calculate grades... My algorithm is long, so I only posted the part that gives me trouble. When classes== 1,2,4, or 5, the program runs f...
[3 replies] Last: I don't know if it's just how the code was pasted into the forum, but ... (by wildblue)
Completed Programming Assignment Check
 
I just completed an assignment and was wondering if you guys could look it over. Everything looks okay to me, except for where it calculates the price for the t...
[2 replies] Last: Your code looks fine to me. Like the person above said I think you sho... (by KyiannaJones)
Multithread in client server programming in c++ windows
 
i have a question how to send a string to clients at the same time. My program puts the clients to a queue so when the first client is disconnected the second o...
[1 reply] : Read about C++ threads here http://www.cplusplus.com/reference/thread/... (by codewalker)
Operation time or clock cycles
 
So I am making a game and I want to push performance to the limit. That's why I really want to know how many clock cycles every operation, cast, memory allocati...
[4 replies] Last: I agree with xismn that you really don't need to concern yourself wi... (by helios)
Datatypes
 
Which datatype is to be use to decleare integer no having length 45 digits?
[2 replies] Last: As another suggestion, if you don't mind losing precision, you can als... (by TwilightSpectre)
file program...if possibli in c
 
Write a c/c++ program that will read an assembly program and mark the statements where relocation/linking will be required.
[1 reply] : what have you got so far? (by mutexe)
converting uesr input int to string output
 
Hi, I am writing a code in a class that will change the user input which is integer to a string. For example if the user enter 13347..the output should change ...
[2 replies] Last: You have multiple problems 1) You are assigning a int to a array of s... (by codewalker)
by smk385
Help with figuring out my sentinel value!
 
So, unfortunately I am back again seeking the expertise of you all on this forum! I have a program that I have written that is suppose to prompt the user to ent...
[15 replies] Last: Ok thanks, I really appreciate your input, prestokeys! Will give it a... (by smk385)
by aj3423
call obj.set_v1 obj.set_v2 ... object.set_v100 with for loop
 
Hi, I've a object with lots of member function, set_v1, set_v2 ... set_v100, large l; l.set_v_1(0); l.set_v_2(0); ... l.set_v_100(0); the number could be ...
[1 reply] : Why do you have 100 member functions? (by MiiNiPaa)
why does this while loop work?
 
The below function confuses me. Basically, since unsigned integers use a two's complement system, we cannot take the inverse of n before processing it, should n...
[1 reply] : If n is -133, reducing it by a factor of 10 with each iteration, it w... (by MiiNiPaa)
Can someone help me process this file please
 
Hello all, This is my first big project in college as a computer scientist involving everything that I have ever learned and is the first time im using class...
[2 replies] Last: There are a lot of ways to organize this... Think of your scenario as ... (by markj)
Why does my windows shut down?
 
Both of my programs cause the window to restart when I select compile and I do not know why. Problem: should include a while loop that allows the user t...
[1 reply] : while (payrate > 18.25 || payrate < 7.50) is wrong: - || is OR and h... (by tath)
Skipping pieces of .csv file and putting into array
 
Hello, I am trying to put pieces of a csv file into an array, but i only want to put certain pieces of it. This is the information that i have Player,Curre...
[3 replies] Last: you can Tokenize by using the delimiter "," and then when you read the... (by anmol2701)
Help with node?
 
Function int Scores::Display() { //temp node to traverse node * current = head; if(head != NULL) { w...
[1 reply] : Seems like some sort of memory corruption. Are you sure your "end" poi... (by abhishekm71)
access violation error
 
Hi I am getting an access violation reading error in my linked list header file. The project takes a binary tree and turns it into an ordered linked list. the b...
[2 replies] Last: access violation error usually occurs when you are trying to access me... (by anmol2701)
Operation with big numbers (remainder of division)
 
I have to build a program that calculates the remainder of the expression (2^10)!/((2^10-500)! * 500!) when divided by 10^9+7 where x^y = x*x*x*x...*x ...
[1 reply] : (a+b) mod m = (a mod m + b mod m) mod m (a*b) mod m = (a mod m * b mo... (by ne555)
Accessing elements in a matrix
 
Say I made a vector matrix: vector<vector<int> > matrix; and the matrix look likes this: 0,0 0,1 0,2 ... How would I make it get a random pie...
[3 replies] Last: Ok, thank you for the reply. This helps out a lot. (by crimsonzero2)
Help with Loops
 
hello. I'm a beginner at c++ and I need to write a program that reads a set of integers and then finds and prints the sum of the even and odd integers. The prog...
[2 replies] Last: If you have not covered arrays, I'd suggest doing the following: Have... (by Aaron Vienneau)
by angelk
Template method
 
Hello everyone, I have a class where a method based on the type passed I should return a value. Can you tell me where I'm wrong. prototype declared in the he...
[4 replies] Last: > typeid(*(Pro*)v.at(i)) ¿why are you casting? > a method based o... (by ne555)
April 2014 Pages: 1... 1112131415... 41
  Archived months: [mar2014] [may2014]

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