Beginners - March 2012 (Page 70)

by Lio
Cast int to char
 
I am trying to initialise array of char by using the increment variable with cast.Why the code doesnt work MyObj() { for(int i=0; i<10; i++)...
[1 reply] : For a something as simple as an integer to character cast don't use "c... (by Computergeek01)
Function Output Help
 
#include <iostream> using namespace std; int sum(int a,int b){ int c=0; c=a+b; cout << c; } main...
[2 replies] Last: Once I ripped out that system("pause") and replaced main() with int... (by Moschops)
What should I learn now?
 
Well, I didn't want to make the title look stupid, but my real question is: What should I learn to create the game? While it may seem stupid, I am really lo...
[4 replies] Last: Go with PDCurses or Ncurses. It may look intimidating, but developing... (by roberts)
by BJzero
I got a error with Microsoft Visual C++
 
hi everyone, Im new to C++ and i like it... i am using microsoft visual C++ 2008 Express edition i started writing my first program but im having a problem.....
[7 replies] Last: Yes. I upgraded to 2010 not so long ago and I don't think I had to "re... (by Gaminic)
Locking parts of an array.
 
Short question this time: I have an array (actually a std::valarray) of integers. They represent a solution, thus they change throughout the algorithm. Howev...
[no replies]
read from file to array
 
Hello. Sorry for my poor english. I have a file of such data Faculty, student name , last name , grades number, grades .. example: faculty john ber...
[1 reply] : Easiest way would be to make a vector of grades, rather than an arr... (by Gaminic)
Accessing LPTSTR pointer string characters
 
I am using Visual Studio 2008 Express Edition with Windows 7 64 bit edition. I want to write a sub-routine to scroll text passed to the subroutine via a LPTS...
[2 replies] Last: Thanks for that, hamsterman. I've printed out the pages for the two li... (by cppuser)
do-while loop that make me sick
 
do{ cout<<"\n\n\n P-Print Receipt S-Save to File\n"; cin>>pos; if (pos=='P' || pos=='p') { cout<<" Loading...\n"; timer(); cout<<" ...
[4 replies] Last: thanks (by xeeps)
can't find why my case, break, and default became illegal
 
Hello everyone! Can you please help me find why my case, break, and default became illegal? #include <iostream> using namespace std; const float Kerri...
[7 replies] Last: thanks peter, but there is another problem, the compiler said that my ... (by silverblade12)
Print out diagonal
 
#include <stdio.h> int main(void){ int input , i; scanf("%d", &input); do{ for (i=input-1;i!=0;i--){ printf(" "); ...
[1 reply] : Well, I will print an asterisk. #include <stdio.h> int main( vo... (by vlad from moscow)
vector multiplication
 
can't find in google! vector1 * vector2 = vector3 then x= summation of vector3
[7 replies] Last: what does vector 4 do exactly? http://bipolarsymptomsinmen.eipaha.com... (by jonny1borneo)
What to use as an error value?
 
I'm writing a program for homework, it's teaching us to use reference parameters. The main function prompts for 2 ints from the user then calls another functio...
[3 replies] Last: > he wants use to use reference parameters so the function has a void ... (by JLBorges)
by Lio
Move constructor problem
 
If I dont include the move constructor(line 30) ,if I do include it --reference to local var temp returned(enabled by default #include <iostream> using na...
[5 replies] Last: You should get that reference to local var temp returned(enabled by d... (by guestgulkan)
Using cin in a simple number game
 
I am very new to C++ and working through an exercise writing programs using do, if, while statements. The problem given by the instructor was simple: Write a...
[1 reply] : See http://cplusplus.com/articles/4z18T05o/ Though the simplest thing... (by hamsterman)
help! adding in increments.
 
i need to write a program that calculates hat size, jacket size and waist size after asking a user their height, weight and age. my problem is coming to the ja...
[3 replies] Last: You worded it just fine. Again, does it make sense that at age=100, in... (by hamsterman)
need help with problem... (dont know how to explain..)
 
3-40 Printing a Time In printing an item such as a time it is often more realistic to print out the time taken in hours, minutes, and seconds. Write a pr...
[4 replies] Last: main 's return type in c++ is required to be int . If the code in ... (by cire)
by mania
finding strings in dat file
 
I have created dat file in that bookno and bookname, i want to search word giving by dynamically from the user and search that word in bookname in dat file and ...
[8 replies] Last: Hi Mr/Mrs/Miss JLBorges , Thanks ... (by mania)
for statement problem
 
Heyy, so here's my code /* Ask for an amount and whether it is taxable; calculate the sales tax and show the tax amount and the total including the tax. u...
[4 replies] Last: :OO i think i get it! i hope.. :c sorry! but, the loop would be for ... (by magadavixt)
by mrshah
For loops and and carrying variables
 
Hi. I have a hopefully simple question on for loops and carrying variables over. I'm trying to write a function that shows more than the 16 decimal maximum prec...
[no replies]
March 2012 Pages: 1... 68697071
  Archived months: [feb2012] [apr2012]

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