Beginners - September 2013 (Page 2)

Help!
 
Why commants like system() are "dangerous"? #include<stdio.h> #include<stdlib.h> int main(void) { printf("Hello World"); system("pause"); ...
[3 replies] Last: Thank you. That was easy for you two. :) (by joseph8)
by mgehad
C++/CLI
 
While Creating windows form Application using (VS2010) Do I only use C++/CLI or I can use the native C++ also ? -if I can when to use it ?
[1 reply] : Hi there, You should try to move your question to the "Windows progra... (by closed account o3hC5Di1)
by noam81
help with solving a problem
 
hi all, im new to c++ and im working with the "jumping to c++" book. i need help with one of the problems- chapter 4 problem 1: "1. Ask the user for two use...
[3 replies] Last: "both are over 100" is not same as "sum of ages is over 100". "Behave... (by keskiverto)
Need help With case structure
 
So im writing code for a game, everything is working fine except when i press a letter instead of a number e.g. "w" instead of "1" it showing the message i want...
[4 replies] Last: thanks for the help, i got it working and yeah i will start to make in... (by Maderthanyou)
by Renov
Need help in class template
 
Hi There This is my Pair.h file #include <iostream> #include <string> using namespace std; #ifndef PAIR_H #define PAIR_H template <typename T> class pair {...
[4 replies] Last: I have one more question.... How to call the print function to show th... (by Renov)
by elfeck
deleting array elements seperately
 
Hello, is it possible to replace a delete myarray; call with a for(int i = 0; i < arraySize; i++) { delete myarray ; } Thanks in adva...
[3 replies] Last: @The illusionist mirage: sure, ¿who cares for undefined behaviour? @... (by ne555)
Help with guessing game code.
 
So I have to write a guessing game code and I'm having some real trouble with it any help would be awesome. Whenever I compile and run the code I get the error ...
[4 replies] Last: To have a user enter a value and store it in "theGuess", a simple cin>... (by unsensible)
getting wrong calculations from function.
 
this is part of a class and the resistor and tolerance have been set to 1000 and 10 respectivley and for some reason it keeps setting Rmax and Rmin to 1000 ...
[4 replies] Last: It's only the type of tolerance that counts. (by keskiverto)
General Practise (?) Question wrt Linked Lists
 
This has nothing to do with any particular piece of code, but is more of a "what's good practise" question. When designing nodes to use in linked lists (and oth...
[4 replies] Last: I would just use the STL, but seeing as it is an elementary data stru... (by keskiverto)
How can I make a boolean function that tells if a number is prime or not?
 
My specifications are to prompt the user for an integer, then display a message indicating if the number is prime. I know that a boolean value can only return ...
[9 replies] Last: Your isPrime function in it's current form always returns true, no ma... (by Danny Toledo)
Image Croping In C++
 
I have an assignment on OMR(Optical mark recognition) , following are the requirements , we have 2 images , 1. main-image(tiff) 2. sub-image(tiff) The...
[1 reply] : sdl would do it. use that and then google something like sdl_resize. i... (by closed account Dy7SLyTq)
by leo255
Getting "Segmentation fault (core dumped)"
 
I use Ubuntu 12.10 as my operating system, and I'm not sure if this is related to that, but that's what I get when I compile my code - No errors, just get that ...
[2 replies] Last: That was definitely it...Thanks man! (by leo255)
Some One Please explain to me...
 
It wont compile.. it gives me`'setNum1,2,3,4' was not declared in this scope... #ifndef NUMBERFUN_H #define NUMBERFUN_H class NumberFun { public: ...
[2 replies] Last: I could make sure that your class function definitions are written lik... (by Shren)
by Karpl
Bumpkins of Bumpus
 
We're just getting more into functions and this is one of our programs that we have to do. It's apparently a familiar one with many program students. I keep try...
[5 replies] Last: > He also never taught us how to use input files in visual studio 2012... (by JLBorges)
help with program errors for savings account program
 
Hi I am having trouble figuring out why i am getting the following error when I run the program. I am getting this error 51 II\FinalProjectSavingAccount.cp...
[3 replies] Last: The error message basically says that you misspelled "#include" (you w... (by Daleth)
"Inline" function
 
I may just have trouble understanding the exact definition, but is an "Inline" function anything special? Or is it just calling a function within another funct...
[4 replies] Last: The C++ standard does say that the inline keyword is to indicate that ... (by andywestken)
Trivia Program
 
Hello all. I am writing a trivia program. The code is finished, I'm trying to call the "questionAnswers" function, but I have these last eight errors. I've been...
[6 replies] Last: Not quite. The questionAnswers() function is useful because it display... (by EtDecius)
Camparisons
 
My question is how to write programs using only one comparison with if statements with out logical operators. Exampe if i wanted to compare a users input i...
[4 replies] Last: thanks. it did (by Xbloo93)
Check integer for 0 on last digit
 
Hi Is there a way to check if an integer say 123456 has a 0 on the last digit using bitwise operators only and not string conversions? 123450 //This has a ...
[2 replies] Last: Wow I thought it required something complex , although I did think abo... (by Nubcake95)
Variable Declaration Error
 
Hi Can somebody please explain to me the following error and how to fix it void processMarks (string studentP, int & assgnmntP, int & markP, bool don...
[2 replies] Last: Sorry, should have giving a solution: Solution 1: void processMarks... (by Stewbond)
September 2013 Pages: 1234... 64
  Archived months: [aug2013] [oct2013]

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