General C++ Programming - February 2012 (Page 7)

by dalawh
sizeof() + arrays
 
Let's say we have "array a = {1,2,3,4,5};". If in the main method, we use sizeof() on a, we get 20 bytes. I made the sizeof() into a method outside of th...
[13 replies] Last: I think I will just give up on understanding this because I seem to ge... (by dalawh)
Hi all, brand newbie here
 
...but it looks like you guys can help! I have to do this assignment in my class and all they are asking me to do is use for statements to create this shape ...
[5 replies] Last: @magicbag2 Only had a few small problems to overcome. Try this. Works... (by whitenite1)
want a suggestion
 
I had problem with my program. I have text file and I want char inside it to be keep in 2d array example in text file has "INSIDE OUTSIDE EXAMPLE" ...
[2 replies] Last: Thank for your help! (by MazdyCAndy)
by hbjgd
Don't know why this is "nan"
 
I have been working on this project for a fair amount of time. And whenever I try to print out my variables so that the output looks right, the variable is "nan...
[1 reply] : Two things I noticed are that you calculate solution1 and solution2 b... (by atropos)
Can someone please help me with looping?
 
Okay i have a project due in about 6 hours. We are coding a quadratic equation solver. I need to figure out how to loop so that the user can input the a b and...
[1 reply] : Maybe post this in the Beginners forums then. haha This is not the be... (by IceThatJaw)
c++ HELP
 
My Teacher Assigned An Assignment And I Need A Little Help. He Wants Us To Write a program that takes a command line argument N and prints out the first N ordin...
[1 reply] : //... if (mod_test==0 || n==11 || n==12 || n==13) { ... (by vin)
by cgyan
aspect ratio calculations
 
I am writing a small gui program for a friend that takes the hassle out of using a particular command line program directly. Some of the options available to se...
[no replies]
by theph
Unexpected Pointer Behavior using Vector<Class>
 
Hey Guys! Since you were very quick in helping me the last time ... I have a bug that I've been trying to get rid of the last ~4 hours. Sorry for the wei...
[3 replies] Last: Again, I think that the problem is that the pointers in Conn become ... (by ne555)
Writing a program to load incrementing websites
 
Hi All Dont know if anyone can help me. I need away of automatically incrementing a website. for example: www.someone.co.uk/client_id=1/somewhere/file...
[2 replies] Last: That seems well out of my depth then. Only know little C++ programming... (by andymeeson)
file change handle
 
hi . i have one question if i want to handle to allow or not allow a file or folder to copy or delete or move , what i must to do ? or i must search for what ? ...
[1 reply] : File permissions are handled by the OS, so you'll have to look into th... (by hanst99)
SOIL issues
 
I am somewhat new to classes and OpenGL, but I am trying to make a program incorporating them. I originally loaded textures using SOIL.h in my main .cpp file an...
[12 replies] Last: It's got nothing to do with the constructor. A constructor works exact... (by hanst99)
multiple default parameters in functions - my solution feels "inelegant"
 
Hi all, I've written the following piece of simple enough code that allows the user to enter the length, width and height of a cube. A function is then called...
[2 replies] Last: Thanks for the swift response! I'd just been reading up on functions ... (by MrJackson)
Looking for advice on object interaction
 
Hi I am working on a little program while doing my hnd in computer software development and we are currently using c++ for oop experience. My idea is to model ...
[4 replies] Last: I have been thinking on your question, i need a crop of 0 so when the ... (by mark venn)
Joystick/controller input??? (1,2)
 
Hello guys, I was wondering if there was any simple (or at least fairly basic) way to get input from a joystick or controller that's plugged into your comput...
[22 replies] Last: Thank you for the link, but I don't have an xbox controller. I only ha... (by SuperSonic)
References and memory
 
Hi, I have a few questions about references. Consider the following code: #include <iostream> using namespace std; int main() { int x = 10; // line...
[5 replies] Last: Thanks guys. (by fungivore)
by rucafe
question of null initialized char array
 
Ok so I have created a class which has the following form: class Step { public: char plus ; char particle ; float energy_sec; float xpos_sec; ...
[3 replies] Last: modoran, So how should I initialize my char variables in my construct... (by rucafe)
Node Graph Interface !
 
hi i create a some nodes class in c++ for example add & Pow & Multiply node with 2 some inputs how i can create a node graph interface (Qt or GTK or etc...
[no replies]
How to declare a boolean array in C++?
 
I want to create a boolean array whose size is 31623 and all values assigned to 0. However for this code when i print some values are different than 1 or 0. Am ...
[1 reply] : a bool is defined as false: zero. true: not-zero. Depending on your... (by Stewbond)
chars not shown properly
 
i tried: char a='ß'; cout << a; but there is shown another charcter... (a small white rectangle) then i tried: char a='ß'; int x=(int)a; cout <<...
[4 replies] Last: NCurses / PDCurses are commonly used for console programs and are cros... (by Disch)
by CPPhys
ODE solving using GSL (odeiv2) in classes
 
Hi everyone, I am trying to solve a system of differential equations using GSL in object oriented programming. I am following the procedure described in: ...
[no replies]
February 2012 Pages: 1... 56789... 43
  Archived months: [jan2012] [mar2012]

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