Beginners - February 2012 (Page 50)

by lql44
Intialize an data member of class
 
hi all, I am trying to initialise an data member of a class, but failed. Any advices? class MathFunctions { public: const static double EWMALamda=0....
[1 reply] : class MathFunctions { public: const static double EWMALamda; }; dou... (by closed account z05DSL3A)
a simple delete[] causes problems
 
Hi guys, I'm new to this forum. I'm trying to understand the way "delete" and "new" works. I wrote a simple program that convert CAPS letter to regular ones....
[2 replies] Last: Cubbi, you are sharp as a razor ! Thanks a lot for your fast help. I... (by Guy Nimni)
by jaff
Visual C++ Library Independence
 
Hello, I'm a final year applied math student. My research project involves writing a C++ program to run simulations on multiple computers. I am using Visual ...
[12 replies] Last: Ah, didn't realise that setting to Release nullifies your include sele... (by jaff)
can't find the error
 
Hi all, This is a textbook example for the use functions. My compiler says there is a "syntax error before } token". I have been looking and testing for hours ...
[6 replies] Last: Thanks for the information. I will have a look at the tutorial and alr... (by HomesickAlien)
What is the meaning of this error?
 
This is the function where compiler gives error: void addFileToDirectory(directory * dir, const file& f) { dir->addFile(f); f.setParent(dir); } This...
[2 replies] Last: Ohh, you are right :) (by yasar11732)
by gift81
My offer is your English - my teaching of programming
 
I'm a developer and teacher of programming. who wants to stady C++, C#, .Net, Java - you are welcome. It's free. what is my interesting?:) My English is not ver...
[6 replies] Last: So:) (by gift81)
Code Returns A Value of Zero For Simple Variable
 
I have defined a variable dX = (b - a)/N, where a = 0, b = 3, and N = 15; however, when I print dX, it always gives me a value of zero which makes no sense. I'm...
[8 replies] Last: Actually what does your program do???? Is it for integration or somet... (by rambo1177)
Printing all values in a 4x4 multidimensional array
 
I've been trying to print out a well formatted values of a 4x4 array but well i've not been successful,belows my line of code #include<iostream> using name...
[1 reply] : You have declared only 2 1 d arrays. int a ={2,3,4,10,2,3,4,10,2,3... (by rambo1177)
by mowali
Arrays problem!
 
The bubble sort presented in class is inefficient for large arrays. Make the following simple modifications to improve the performance of the bubble sort. #...
[2 replies] Last: What mowali says is a different method of sorting . You musn't even re... (by rambo1177)
I am trying to better understand two dimensional arrays with functions
 
I created this program in hopes to better understand 2d arrays by doing simple operations. I am just not getting it. All I am trying to do is add to values from...
[8 replies] Last: Thanks so much. The pieces are falling together. (by tempneff)
using void** pointer
 
Hello Everybody, I want to use void** pointer as a function arguement. But I am not able to use it as it is giving many errors. using single void pointe...
[5 replies] Last: ah, sorry, maybe you need reinterpret_cast instead of static_cast (by Disch)
Problems with Leap Year check
 
Trying to get my leapyear checker to work, but I'm finding it's not working regardless how I move things about. Any tips? In member function `void DayOfYear:...
[2 replies] Last: Sorry im on my phone so hard to type what I want. In short, your chec... (by clanmjc)
Switched to new IDE - program no longer runs correctly
 
Hi. I just installed code::blocks to replace dev-C++. I have a program that runs fine when compiled with dev-C++ but not with code::blocks. In particular, this ...
[7 replies] Last: Also, can anyone tell me why the function returned a garbage value wh... (by vin)
How is this unsigned short so big?
 
I am just testing some ideas for a program I need to make for school. I am wondering why I am able to output a number bigger than the 65553 that an unsigned ...
[3 replies] Last: Thanks so much, that was it. (by tempneff)
File I/0 question
 
Hi, I am having troubles figuring out how to get the leading white space out of my output file. Below is the line in a .txt file I am supposed to get 3...
[2 replies] Last: Its from an assignment. I want to get the 1 right underneath the F in ... (by closed account 2EURX9L8)
Invoking constructors of parent classes
 
When I implement the below code the o/p I get is: mother: int parameter: 20 father: int parameter: 30 son: int parameter: 10 Which is perfectly fine. My q...
[2 replies] Last: perfect! thanks.. (by dolphin spa)
printing change back for the output?
 
i am extremely confused as to how i would get the program to print this? The change is: [$=7, Q=3, D=1, N=1, P=4] i dont know how you would write a program th...
[1 reply] : $7.94 dollar is easy which is 7 now you have 94 so lets start with ... (by nooblet)
by eves
addition of 2 numbers stored as vectors
 
Hi, I'm trying to write a program to add 2 numbers, stored as vectors of characters. the larger number is a vector max with size lmax (int) and the smaller numb...
[3 replies] Last: I got an update email but the post is not showing up. But I got your ... (by histrungalot)
Changing veriable names while it excutes?
 
can i change a name of a veriable like int one; to int two while the code is running
[2 replies] Last: Why would you even want/need to? What was the problem? (by WhiteWind)
oh my gosh i can't even get isdigit to work
 
I have tried the most basic of programs and I just cannot get it! int main(void){ int guess; scanf("%d", &guess); if(isdigit(gues...
[4 replies] Last: ok thanks! I changed it to this and it works now: int main(void){ ... (by Cloudboy)
February 2012 Pages: 1... 4849505152... 64
  Archived months: [jan2012] [mar2012]

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