General C++ Programming - October 2012 (Page 12)

Printing individual values from 2d array
 
I've been working on a program where I'm taking data from a text file and putting it into a 2d array called str . The issue is that later on I want to output ...
[2 replies] Last: Thanks, that's very helpful. However I need to manipulate some of the ... (by LastDamnation)
To print all combinations of length k from n array
 
I have an array containing numbers , say {1,2,3} then i have to print unique combination of length k where we know value of k at runtime . So if now k=2 solutio...
[14 replies] Last: Yeah , this can become good source for others :) I agree with @mik271... (by Maggi Iggam)
Normalising Eigenstates
 
I'm a 3rd year college student studying maths and physics and as part of our course we do some c++ with the aim of modelling in mind. Our current project involv...
[no replies]
by roarkr
Static const char *Numbers
 
Hi, As a hobby C++ programmer I still have a lot to learn I have the following code lines in my app: static const char *Numbers = "2400:2401:2402:2403:24...
[2 replies] Last: This is the basic concept. NOTE: i have not included the definition o... (by closed account 9y8C5Di1)
help with c++ complex numbers program
 
I need help with a program involving complex numbers, here is what i have and i am stuck what I need to add to get the program to compile and run correctly. ...
[2 replies] Last: Try this: // Complx.h #include <iostream> #include <fstream> usin... (by Nabijon)
type conversion
 
Hi. How to insure that unsigned int is higher in the hierarchy than int ?
[4 replies] Last: It's from the standard. I wasn't sure so I assumed you meant integer ... (by Peter87)
What's wrong
 
Hi Why does my compiler cry? Here's my code: main() { int a = {{-3, +7}, {3, 24}, {45, 7} } , b ={ {-4, 23, 13, 8}, {53, 11, -1, 7} } ...
[2 replies] Last: I corrected the code.It had an extra brace as you kindly pointed out: ... (by hooshdar3)
by antuka
check validation of Isbn number
 
isbn
[4 replies] Last: OP for reference: hey anybody help,this is freezing my mind. i suppo... (by Moschops)
resistor color code
 
ok. so i'm doing a school project where i have to make a program that: 1. Asks the user to enter (a) A minimum resistance value RMIN. (b) A maximum resista...
[19 replies] Last: @Troyque (1) Don't make pointless posts like that, you could easily b... (by TheIdeasMan)
by ecasey
Limit Checking: Is the input a number?
 
Ok, please bear with me as I'm a "newbie" to both forums and C++. I'm writing a program that converts between Celsius, Fahrenheit, and Kelvin for a C++ clas...
[3 replies] Last: int number ; // as long as a number is not successfully read while( ... (by JLBorges)
How can I answer the following questions for this program?
 
The questions are: i.What do we call a number like 0 in this problem? and the variables x? y? and num? (They all have loop related names, so the answer isn’...
[no replies]
Switch Statements
 
I was studying switch statements but I can not figure out its outputs. I get totally wrong values. Consider the following codes. The outputs are 4, 4 and 5. Can...
[3 replies] Last: Ohhhh yes I understand now.. For the outputs to be what I initially th... (by Manator)
Determining if a string is valid
 
Hey folks, I'm up late on a project and have run into an issue. I'm trying to get a lookup piece of code to read from a file and determine if there is a code th...
[no replies]
by lmd141
Compiling time
 
Hi there. I have a double called "max_translate" in my program that is used in this part of code: const double delta_x = rand(-max_translate, max_translate)...
[1 reply] : Well, with the amount of detail you've given us, it's hard to tell. I ... (by helios)
Addressing Byte Arrays for Data Access
 
So apparently this works: Float to Byte Array // float f = ... char b ; b = ((char*)(&f)) ; b = ((char*)(&f)) ; b = ((char*)(&f)) ; b = ((char*)(&f)) ; ...
[no replies]
Creating a program using arrays
 
i have to make a program that will use arrays the problem is make a code that will ask the user to input a string value and display the number of times a cha...
[no replies]
getting integers form a txt file and outputting it.
 
I have to write a program that gets the even integers from a text file and outputs it to another text file but im having trouble. How do I begin to get the int...
[no replies]
linear and binary search problem
 
these two method can only search the first element you want to find, but if there's 2 or more same elements you want to find, and store them, what should I do? ...
[2 replies] Last: You need to know how many items can be stored how could you know how... (by ylxin1993)
by lmd141
Output help
 
Hi there, I'm writing a program that should calculate the energy of a system. There are three subroutines written, which one is used depends on a random number ...
[7 replies] Last: Thanks a lot, worked a treat. (by lmd141)
by iky
FUNCTIONS HELP!!!
 
hi. i wrote a function and i am supposed to write the same function into it and i keep getting errors. how would i write the same function into the first functi...
[5 replies] Last: no you are obviously not looking at c++ functions start over with a tu... (by Aramil of Elixia)
October 2012 Pages: 1... 1011121314... 50
  Archived months: [sep2012] [nov2012]

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