Beginners - July 2010 (Page 25)

size_t and null characters...
 
Hello, I just got myself a bit confused over size_t... I have written the following function to extract the last four characters of a date to get the year: ...
[7 replies] Last: Does this mean the null character is assigned to the 4th element in y... (by moorecm)
Not sure where I am missing a bracket
 
#include "StdAfx.h" #include <iostream> #include <string> using namespace std; int main () { string input; cout << "Please type the name...
[3 replies] Last: you can google it and you will find it. i guess it 's a windows API f... (by sourena)
by keithh
Types - Integers & Double
 
I have the following line of code: x = y - (1/(z+1)) * B, where x, y, z, and B are integers. What is the proper way to make sure x is computed accurate...
[5 replies] Last: x = static_cast<int>( y - ( 1 / ( z + 1.0 ) ) * B ); (by jsmith)
C++ win32 OpenGL Mouse Movement
 
I am attempting to create a program that tracks mouse movement and then draws a line between 2 coordinates every 20ms. So my troubles: 1: Converting the mouse ...
[7 replies] Last: Thanks, it works! Josh (by closed account DSvMDjzh)
How to Prevent Repeating Random Arrays?
 
I'm writing a program that will display a random string of array, but it would likely repeating the chosen array for a short time. Ex. Program: two user: od...
[2 replies] Last: [quote=mainframe639]I want the program to choose a string once and nev... (by m4ster r0shi)
Reverse digit by using loops
 
This is the question. Write a program that prompts the user to input a positive integer number and then output the number with the digit reversed.For example i...
[6 replies] Last: Thanks for all your comment...I already solve it...Thanks a lot... (by Jackywong)
my_comment_to:: in C++
 
the invent of :: make coder to code more , and it is use to tell the sub-function is under which parent function. may i ask do this legal in c++? : sell::...
[1 reply] : Given the proper declarations appear before that point, yes. What cons... (by helios)
avoiding "using namespace std" in header file
 
Hi guys. I have somewhere (I really can't remember where) that you should not use the "using namespace std" declaration in the header file. I have several q...
[4 replies] Last: Thank you. I'll try to keep that is mind (by yotama9)
View Output?
 
I'm using Code::Block v10.05, and I'm using the very first script; #include <iostream> using namespace std; int main() { cout << "Hello World!"; ...
[5 replies] Last: Yes, I just re-installed it again and it won't work... (by TheNewScripter)
Console Application Crashing on Start
 
Hello everyone. This is my first post here, and I'm kind of new to c++ programming, so please bear with me...thanks. Before I describe it, I guess I should say ...
[2 replies] Last: wow, I can't believe I forgot to do that... Thank you very much. Th... (by theda54)
2D Array question
 
just got assigned a problem dealing with assigning random "seats" to a 2D array that is supposed to represent the seating chart of an airplane. I'm supposed to ...
[4 replies] Last: Everyone has to start somewhere right? http://www.cplusplus.com/ref... (by mcleano)
why this program release un exception
 
please anyone kindly compile this program and tell me why that short program throw an exception when it run at the function CollectInformation(Table&table,char*...
[no replies]
decimal,octal and hexadecimal
 
I am a new beginner in c++.i want to write a program that print the decimal,octal and hexadecimal values of all characters between the start and stop characters...
[4 replies] Last: See http://www.cplusplus.com/forum/beginner/25812/ (by Bazzy)
by Rizz
Compile FITS2jpg source error
 
Hi all, I'm a beginner on c++ and i need to compile this source: ftp://ftp.cv.nrao.edu/NRAO-staff/bcotton/software/FITS2jpeg.tar.gz It needs other 2 libr...
[no replies]
by juanix
priority_queue find specific element
 
I'm using the following priority_queue for discrete event simulation: std::priority_queue < event*, std::deque<event*, std::allocator<event*> >, compareEv...
[1 reply] : I think you are asking for functionality that is beyond scope of a que... (by jsmith)
by Dom87
what is wrong in this piace of code?
 
#include <iostream> using namespace std; int main() { long **d1; for (int i=0;i<10;i++) for (int j=0;j<10;j++) { ...
[4 replies] Last: ok thanks (by Dom87)
by michy
access modifier
 
hi all, recently im learning about inheritance, i have a question about access modifier... How do i initialize or get a data from a private access modifier cla...
[1 reply] : You do it through public functions in Base class. In this case, the co... (by hamsterman)
by michy
converting long long int
 
hi all, i having a problem, how do i convert a string to long long int? this is because i have a code getline(cin,x) long long int y=atoi(x.c_str()) thi...
[1 reply] : http://www.cplusplus.com/articles/numb_to_text/ (by bluezor)
writing to a pre existent file
 
i have a file that i filled with null to size 128MB and than i write at certain offset(otFBL=655424) from its begining numbers from 1 till 129407 as integers(ha...
[2 replies] Last: i have tried this before and it didnot work well either (by mostafa44)
Can not get Eclipse + MinGW working properly
 
Hi guys, Firstly this is the windows program, not linux. I have absolutely no C++ experience but want to get started with this.. I have several years expe...
[no replies]
July 2010 Pages: 1... 2324252627... 31
  Archived months: [jun2010] [aug2010]

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