Beginners - November 2011 (Page 65)

Having some huge issues with my list program
 
Howdy. For my CSC 265 course, I'm making a list program. The rules are as follows: The program has a List class, which has a dynamic array (starts at size 2). ...
[3 replies] Last: { size += 2; int* new_array = new int ; // allocat... (by closed account DSLq5Di1)
shuffling arrays with random function
 
Make an array shuffle program that can shuffle array randomly... make sure it gives shuffled array each time. if i pass array containing 12345 gives 45321 or 51...
[1 reply] : "plz give some idea about it." 'plz' give some examples of attempts t... (by ciphermagi)
BMI Calculator Help.
 
Hello i am trying to code a BMI calculator. This isnt mine i just found on the internet. The code is //BMI Calculator //Created by Rahul Kucheria //...
[5 replies] Last: @whitenite1 It works perfectly. Thanks a lot (by rahulkucheria)
How do you intialize a reference to a pointer
 
I wrote this simple program. I get an error saying that the member variable 'value' is not initialized, so how do I initialize it. Secondly, I'd really apprec...
[1 reply] : References have to be initialized in the constructor's initializer lis... (by Disch)
Vectors, Searching and Files
 
Hello, I am new to C++ and very lost. I have attempted this program but my output displays file was unable to open. I am not sure I am even on the right track. ...
[6 replies] Last: Ok thanks fafner. I will make some changes and keep plugging along. (by jenbrandau341)
make server
 
dose any one a good server library or header that is easy to use? I already know a little about the servers like my IP and the port I want my program to use,...
[2 replies] Last: I suggest picking a nice little tutorial and carefully reading it. ht... (by closed account DGvMDjzh)
by ihm
cin to two vectors
 
I am trying to cin numbers into two different vectors. After I entered a series of numbers for the first vector, I ctrl-D'ed. But it didn't give me a chance to ...
[3 replies] Last: [quote=ihm]What are the pros and cons of dynamically allocation vector... (by Galik)
by arefe
Dev C++
 
Hello, Just installed Dev C++ version 4.9.9.2 with Windows XP operating system service pack 3 . I installed it in the C drive. It seems that the program is ...
[2 replies] Last: It is running. You have written a console programme, so it runs in a c... (by Moschops)
Problem with ifstream
 
EDIT: Never mind, solved it. This program is supposed to read a file of this format: string int int char for example; add 26 12 M And then move cursor to t...
[no replies]
by gh24
Help Creating Random Matrix Needed
 
Hi Guys, I am trying to create a random matrix. I am using Newmat10 and its appropriate libraries. I am not sure how to create a random matrix though. Here ...
[6 replies] Last: Oh sorry. Well, the reason is obviously because you're trying to print... (by closed account DGvMDjzh)
arrays
 
I want to declare several different arrays, which are contained in several different functions. So what I want to do is something along these lines: void fun...
[3 replies] Last: Ok, then you are doing it wrong: Why do you declare the constant at t... (by webJose)
by cmk46
Initialization Order of Static Const Member Arrays
 
I have a class that contains several private static const member arrays. One of the arrays needs to be initialized using values from the other two. What is th...
[3 replies] Last: Yep, the order of initialization is the order in which they are define... (by closed account DSLq5Di1)
print shapes using characters for loops
 
Hey guys, for (i = 1; i <= n; i++) { for (j = 1; j <= i; j++) cout << "*\t"; cout << endl; ...
[9 replies] Last: Finally figured it out myself. Thanks for your help anyways :D for (... (by daldrome)
Converting for loop to do-while loop
 
Hello, I have been working on this small program for 3 days and am able to write for loops quite easily. This time I need to convert my for loop to a do-whi...
[2 replies] Last: and i'm suprised that you even get the output you mention from the whi... (by erikn)
How do I let the user choose between two classes at runtime?
 
Howdy. I know the title is somewhat vague, and I apologize. In my CSC 265 course, I'm making a program that uses a List class and a Set class. Both classes a...
[1 reply] : Think about the scope of those variables. Let's assume that choice ==... (by prophetjohn)
logical error with binary search program
 
Hello Let me say this, the site has been very helpful especially when a person is willing to try the code themselves instead of just asking for answers. I fe...
[2 replies] Last: nvm, i just realized that where i have the "IF" statement, it should h... (by hardknock)
Use of delete
 
Hi, I'm trying to free some memory taken by structures. In short, the structure is define like this: struct GenericStructure { double x,y,z; } Pretty simple...
[16 replies] Last: The memory leak has been solved :) If you show your actual code, may... (by ForeignCurs)
Lost in if-else conditions
 
I am reading a piece of code, which confuses me by its if-else conditions if( depth(resgni)==depth(curgni) ) if(!adj) { Index3 bb(path(resgni)-pa...
[5 replies] Last: helios, Thanks a lot for your explanation. I think what you interpret... (by subjugater)
Multiplying two random numbers
 
So this is a program to test elementary multiplication tables but the line where it says a * b = answer it says it cannot do because it has to be one value. Ho...
[1 reply] : use answer = a*b; instead of a * b = answer; = operator assigns... (by tfityo)
November 2011 Pages: 1... 636465
  Archived months: [oct2011] [dec2011]

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