General C++ Programming - May 2012 (Page 11)

by ehsana
clr() and [a or b ? c]
 
hi all does anybody know what these instructions mean? for_all_points { clr(px);clr(py);clr(pp); } and also #define viscous_c(d,mu) ( ((mu==0.0) |...
[3 replies] Last: It looks like it tries to avoid division by zero but it fails to check... (by Peter87)
Printing Garbage
 
Hi all, I am trying to reorganize a list that I downloaded from the web. I am loading / reading in one char (ch) at a time. Then using a group of functions to ...
[11 replies] Last: $ ./program.bin < input.txt Would be the program invocation from th... (by cire)
by jls36
initializing static vector
 
I have a static vector data member in my class and Im having trouble to initialize it. My vector's data type is another one of my classes which is called Leg. I...
[7 replies] Last: cool, Thanks for being helpfull. (by jls36)
how to create timer in c++ application?
 
hello,people.. in console ,there are different things that we do,like printing the values but what should we do if we want to put the timer for changing the va...
[1 reply] : build your own delay function using time functions. rough code: #... (by SirSmilesaLot)
Does std::wcout forces passing arrays by value!?
 
Hey everyone, normally an array is passed by reference meaning, that if I change the array in the function, the original array is changed. However, if I call...
[9 replies] Last: After some googling, I think the behaviour is well defined, it must b... (by cire)
by ksmzcr
Collected data comparison
 
I have real time data from IR camera. I collect 3d positional data from camera. what I want to ask is that for each 250 miliseconds I want to check the positio...
[2 replies] Last: Sorry, I am not an expert programmer. Can you please open up the data ... (by ksmzcr)
Formatting console output into columns
 
I have a function void ShowList() that(theoretically) prints out my data into a neat column, but upon running i get a messy bunch of code. How would i go about ...
[2 replies] Last: Thank you very much doug4! i was able to fix my program and get the ou... (by Need4Sleep)
What's the result?
 
Hi! guys I am here with a problem a want a result of a line. I want to check if its result is in numbers or in alphabets enum COLOR{ RED,BLUE,GREEN,WHITE,BL...
[6 replies] Last: Maybe he was thinking about scoped enumerations (enum class) which has... (by Peter87)
AI for game
 
so i have been working on a game but i need a AI to run the main NPC so can anyone help by telling me what i need to do
[3 replies] Last: AI is a very broad term. How the "AI" will work depends on your game. ... (by Peter87)
whats wrong with my code ?
 
#include <iostream> #include <string> using namespace std; int main() { string entline = ""; int i = 0, n = 0, x = 0, linelen = 0, counter = 0, filler ...
[2 replies] Last: #include <iostream> #include <string> using namespace std; int main... (by krakissi)
Whats wrong with this code?
 
its ok i got it :)
[1 reply] : How can we answer if we do not know how shall the loop work?!:) (by vlad from moscow)
Help me please i dont know what is wrong with my program
 
#include <iostream> using namespace std; int main() { int a; int b; int c; cout<<"type how many alcho...
[10 replies] Last: Thanks for the help guys :) i've made the program work :) (by JonasQuist)
Using vectors in functions
 
[I am converting some array using college exercises to use vectors, but I need some help.] I need to know how to use a vector in calling a function originall...
[5 replies] Last: One problem solved: I defined my variable twice. Once like this: std:... (by erandall)
Templates
 
A basic program but I can not get the template<> for the string to compile. Any help please. #include <iostream> #include <cstring> //pg 882 in textbook ...
[8 replies] Last: The following code lines use an overload function, note the function i... (by closed account 3TXyhbRD)
Pointers question?
 
Which one of these declarations is valid and why? int *p=*a; OR int *p=&a;
[11 replies] Last: ofcourse it is not a good programming practise, but its not invalid, ... (by Moschops)
how to create a operating system
 
so i have been wanting to make a OS but can anyone give some help by telling me were to start and any other info that may help and by the way it is a mobile OS...
[7 replies] Last: the best place to get started with os dev is at the wiki http://wiki.o... (by Zaxuhe)
What's problem with this
 
Hi! I want a little help with constant. What is the problem if I don't use it. Please help me with this gaming example: const int KillBonus = 5000; even i...
[2 replies] Last: [quote=rckinesis] "What is the problem if I don't use it." A smart c... (by closed account zb0S216C)
[Variable name]*
 
Hi everybody, hope you can help me with a problem i got I wrote a c++ program using elements of dynamic memory, and writing the code below i i got the error "i...
[5 replies] Last: 0.k., got it, thank you very much! But anyway I didn't understood why ... (by SpamBot)
automatic changing the values
 
my output sud b a name(like john smith:age) & his age should change automatically ( 10 times,startin wid 10 ending wid 20),every second ,& after 10 changes it h...
[5 replies] Last: hey krakissi,i xpalined why the language went weird,now dont bully me ... (by umeshinator)
'func': function call missing argument list; use '&func' to create a pointer to member
 
C_TreadRecognize.cpp C_TreadRecognize::C_TreadRecognize() { bool result = FALSE; result = (unsigned long)(-1) == sys_create_thread(recognize_thread, 0 /*...
[2 replies] Last: Thanks I managed to habs (by Kasirga)
May 2012 Pages: 1... 910111213... 41
  Archived months: [apr2012] [jun2012]

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