Posts
 
Reputation
Loading chart. Please wait.
Joined
Last Seen
0 Reputation Points
75% Quality Score
Upvotes Received
4
Posts with Upvotes
4
Upvoting Members
2
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
~97.3K People Reached
Favorite Tags

53 Posted Topics

Member Avatar for new_developer

Hi there, I want to display images from internal storage into grid view. I have tried this code but i think its for external storage. File file= new File(android.os.Environment.getExternalStorageDirectory(),"image"); Kindly help me I don't have that much experience. Thank you.

0
317
Member Avatar for new_developer

Hi there, I am stuck in a problem in which my function rounds off a decimal point number upto 4 decimal place and return a 0.0000 number. But when i compare this returned number to 0 it did not return true in if condition. Please check my code below and …

Member Avatar for rubberman
0
12K
Member Avatar for new_developer

Hi everyone, Please check my code below and tell me that why double stores number upto 3 decimal places ? #include <iostream> using namespace std; int main() { double dNo; dNo = 363.430965; cout<<"double no : " <<dNo <<endl; //cout only outputs dNo value upto //3 decimal places return 0; …

Member Avatar for rproffitt
0
326
Member Avatar for new_developer

Hi everyone, My program is crashing on taking input of alpha-numeric and store it in char[]. I don't know why, please anyone help ! sample input : C9H8O4MgOH #include <iostream> #include <string.h> using namespace std; bool hydroxide(char[]); int main() { char formula[] = ""; cout<<"Enter chemical formula : "; cin …

Member Avatar for Mayukh_1
0
231
Member Avatar for new_developer

Hi there, How to set vector size in Class ? I have set vector size at time of daclaration but it does not work. And should we have to deallocate vector memory in destructor ? #include <iostream> #include <vector> //included to use vector using namespace std; class VectorDemo { private: …

Member Avatar for Moschops
0
542
Member Avatar for new_developer

Hi there, I need explanation for the range of data type say character which is 1byte ranges from -127 to 127 or 0 to 255. I did not understand what it means and how can I check the range of characters. Does it means it can store only values from …

Member Avatar for Slavi
0
263
Member Avatar for Asim_7
Member Avatar for new_developer

Hi there, I am having problem with deallocating string two-dimensional dynamic array. My program works fine but for some conditions such as when row size is greator than column size in 2d dynamic array, the program crashes when it goes into destructor. My program is as follows : #include <iostream> …

Member Avatar for new_developer
0
254
Member Avatar for new_developer

Hi there, I know this question is very common but I still didn't understand that why we can't check if array is not initialized. Isn't there a way to check an array is initialzed by any values(int, double). I am working on array based program, in which I have to …

Member Avatar for deceptikon
0
1K
Member Avatar for new_developer

Hi there, I need getch() type function for int through which I can take input from user, to store it in int variable. I actually want to use in menu from which user selectes any number to call that function to carray that task. Reason of using getch() function is …

Member Avatar for Moschops
0
188
Member Avatar for new_developer

Hi there, Is there a way to change strings array size on run time. I mean array size initial value is 1, when i run the program, how much user add values array size increases. I have tried following but its not working, please i need a solution in array …

Member Avatar for new_developer
0
321
Member Avatar for new_developer

Hi there, I have a question related to C++ functions. If a boolean return type function contains too many returns in it, does it cause any problem ?? In my program one of the bool function contains too many return statements, in if conditions. And interesting thing is that it …

Member Avatar for Ancient Dragon
0
220
Member Avatar for new_developer

Hi there, I want to know about wchar_t data type i.e. how it is used and why we use it. And also what is the difference between char and wchar_t. One last thing why we write L before wchar_t initialization. #include <iostream.h> void main() { wchar_t w; w = L'A'; …

Member Avatar for deceptikon
0
158
Member Avatar for new_developer

Hi there, I am implementing simple student class when i run the program it crashes after getting input for char* name. Program is as follows. #include <iostream> using namespace std; class Student { private: char* name; int rollNo; float cgpa; public: Student() { name = ""; rollNo = 0; cgpa …

Member Avatar for rubberman
0
419
Member Avatar for pearl doll
Member Avatar for new_developer

Hi there, Is there a way to check a variable if it is not initialzed by value ? I need a check for all datatypes. int num; if(!(numIsNotInitialized)) num = 12; else cout<<"num : " <<num <<endl;

Member Avatar for mike_2000_17
0
356
Member Avatar for new_developer

Hi there, I am implementing the concept of polymorphism and write following program of shapes. #include <iostream> using namespace std; class Shape { protected: double width, height; public: void set(double w, double h) { width = w; height = h; } virtual double get() { return 0; } }; class …

Member Avatar for new_developer
0
184
Member Avatar for njoguj
Member Avatar for uzziel

If I have understood clearly, your problem solution is : #include <iostream> using namespace std; int main() { int researchPro[10]; //input no of research projects //done by 10 students for(int i=0; i<sizeof(researchPro)/sizeof(researchPro[0]); i++) { cout<<"Enter the number of research projects done by students : "<<flush; cin >> researchPro[i]; } int …

Member Avatar for new_developer
0
339
Member Avatar for sujanthi.kumari

You can't put comma in floating point variable value whether it is in if condition or in assignment.

Member Avatar for new_developer
0
183
Member Avatar for jt1250champ

Read text file from begining solution. #include <iostream> #include <fstream> #include <string> using namespace std; int main() { fstream inputFile; string fileStr; string fileName = "file.txt"; inputFile.open("file.txt"); if(inputFile.is_open()) { cout<<fileName<<" file is open."<<endl; inputFile.seekg(0, ios::beg); //to start reading file from begining while(inputFile.good()) //just for safety { getline(inputFile, fileStr); //read line …

Member Avatar for new_developer
0
846
Member Avatar for soche123

You can do this by using do while loop, example is as follows: char repeat; do { cout<<"Hello World !"<<endl; cout<<"\nDo you want to repeat the program(y/n) ?"<<endl; cin >> repeat; }while(repeat == 'y');

Member Avatar for new_developer
0
235
Member Avatar for soche123

Here is the code for simple calculator implemented using switch. #include <iostream> using namespace std; int main() { int num1, num2; //input two numbers for operation like +,-,/,* int sum = 0; char op; //variable for operator cout<<"Enter num 1: "<<flush; cin >> num1; cout<<"Enter num 2: "<<flush; cin >> …

Member Avatar for rishif2
0
3K
Member Avatar for soche123

Following code count digits in a string. #include <iostream> #include <string> using namespace std; int main() { string str = "hel22lo35Wo4rld"; //string with digits int digitCount = 0; //string is char of array so we will check each char whether it is a digit or not //by using loop for(int …

Member Avatar for new_developer
0
183
Member Avatar for new_developer

Hi there, I have read that when we create object of a class, its default constructor is automatically called and default constructor assigns default values to variables e.g. to int it assigns 0 and to float it assigns 0.0 ... But I have write a program in which I have …

Member Avatar for new_developer
0
272
Member Avatar for new_developer

Hi there, What is the easiest way to declare and initialize 2d dynamic array in class in C++ ?? Please tell me the easiest way, I have used 2d dynamic array in Java. Thanks !

Member Avatar for deceptikon
0
245
Member Avatar for new_developer

Hi there, I need help in making class diagram. What are the attributes of staff of University its behaviours(functions) of staff ?? The attributes which i figured out are name, id, salary, dateOfJoining, qualification. But I can't figure out functions. Anyone please help.

Member Avatar for tinstaafl
0
132
Member Avatar for new_developer

Can we access updated public variable of one class in another class without inheritance. Just like below. This class A which have public int variable x. In updateValue function i have updated x value. class A { public: int x; A() { x=0; } void updateValue() { for(int i=1; i<=5; …

Member Avatar for Lucaci Andrew
0
5K
Member Avatar for new_developer

Hi guys ! I am newbie, I have downloaded oracle 11g release 2 but i don't know where to start and how to connect C# program to database. I want to write simple program of username and password in which I it stored in database. And also maps the username …

Member Avatar for LastMitch
0
265
Member Avatar for new_developer

Hi there, I am using code blocks and working on bank account programe. I have three classes but just included main function code. My programe works all fine, in which user create account and then deposite initial balance **but before end of do while loop, there is getline function to …

Member Avatar for deceptikon
0
1K
Member Avatar for new_developer

Hi everyone, I have a simple problem related to string, but I did not notice before that we can't give space in string input. For exmaple in the following program, take name input from user. If user enter M John, it will skip the enter email input(and the program will …

Member Avatar for new_developer
0
178
Member Avatar for new_developer

Does any buddy tell me use of asterik in C++ ?? And also explain use of static in methods and in constructors. Actually I am search a code that dynamically creates an object of class. Anyone please help ! class BoxFactory { public: static Box *newBox(const std::string &description) //expalin this …

Member Avatar for ravenous
0
254
Member Avatar for new_developer

Hi there, How do we differentiate between NULL and zero in C++. I have a program in which i assign NULL to num variable but if i apply if condition to check whether it is NULL or zero. Program still gives me result zero. //num = 0; num = NULL; …

Member Avatar for Ancient Dragon
0
614
Member Avatar for new_developer

Hi everyone, I am stuck in writing Bank Account program. I want that if user wants to create an account, BankAccount class object is created. Then after this i call to its methods such as getBalance() to get the balance in the account. But its not working and I am …

Member Avatar for nullptr
0
131
Member Avatar for new_developer

In the following program i can't access balance value of parent class in the child class. If the child class can access all attributes and methods of parent class, then why i am getting 0 value when i access parent class balance. Anyone please help, my programming understanding is very …

Member Avatar for Lerner
0
294
Member Avatar for new_developer

Hi there, Please check my program. When i compile it i am getting error. Cannot find default constructor to initialzie base class. #include <iostream.h> #include <conio.h> class Parent { protected: double num; public: Parent(double n)  { num = n; } void sub() { num -= 2.0; cout << "num …

Member Avatar for NathanOliver
0
342
Member Avatar for new_developer

Hi everyone, I writing a program in which two methods I want to count when it is called. I don't know how to do this. //parent class void BankAccount::deposit(double dep) { if(dep > 0) balance += dep; } void BankAccount::withdraw(double wd) { if(wd > 0 && wd <= balance) balance …

Member Avatar for L7Sqr
0
96
Member Avatar for new_developer

I want to write a simple program to check class and inheritance in Code Blocks but i don't know how to write. I have make new project and add new class named "Car". This is main class. #include <iostream> #include "Car.h" using namespace std; int main() { Car c; return …

Member Avatar for new_developer
0
386
Member Avatar for new_developer

Hi there, Good day ! I have a question related to private variable in php class. I want to make check if someone accesses private variable, an exception is thrown says "this is private variable" and rest of the excecution of code didn't stop. <?php class myClass { public $str; …

Member Avatar for Bachu
0
173
Member Avatar for new_developer

hi everyone, I am trying to initialize array in main method, and insert value in array in another method named "popArr()", in last print array in "printArr()" method. But its not working and i am getting errors. The environment i am using borland c++. The code is as follows. #include …

Member Avatar for Lucaci Andrew
0
167
Member Avatar for new_developer

Hi, I want to know how to concatenate numbers in C++. int a = 4; int b = 5; int c = a+b; I have tried this but this give me sum of int a and b. I want 4 and 5 concatenate in c variable and give me out …

Member Avatar for TrustyTony
0
14K
Member Avatar for new_developer

Hello everyone ! I want to get output in C++ in same line. The following code gives me output in separate line. for(int i=0; i<=10; i++) { cout << i <<" " <<endl; }

Member Avatar for new_developer
0
1K
Member Avatar for new_developer

I have div. <div>This is text in div1.</div> How do i get the text written in div to variable in javascript ??

Member Avatar for JorgeM
1
155
Member Avatar for new_developer

Dear All, I am using cable net, in which they didn't gave me modem. I just plug the cat5 cable into lan to connect to the internet. I have asked them to give me 1mb speed. Does anyone tell me how they control internet speed in network becasue not everyone …

Member Avatar for JorgeM
0
178
Member Avatar for new_developer

Hi everyone, Please help me in rounded border corners. I have generated rounded corner borders from site and it give me five images (four corners and one dot image files). I have set all corners according to that site's description HTML and CSS code. But I can't set bottom right …

Member Avatar for luweegee
0
207
Member Avatar for new_developer

What does "values", "data" and "field" mean in java ? For example, definition of encapsulation is hiding of data in a class and making this class available only through methods. In this way the chance of making accidental mistakes in changing "values" is minimized. In access specifiers, Java allows us …

Member Avatar for JamesCherrill
0
214
Member Avatar for new_developer

Hi everyone, I am new in Java programming. I want to know that how to check integer variable whether it is null or not. I have a situation I write a program that asks that how old are you. If a person accidentally press enter and does not put a …

Member Avatar for JamesCherrill
0
48K
Member Avatar for new_developer

Hi everyone, Please check php code below, when i load this page in browser it gives me following errors. "Notice: Undefined index: submit in E:\wamp\www\login\register.php on line 4" "Notice: Undefined index: fullname in E:\wamp\www\login\register.php on line 5" "Notice: Undefined index: username in E:\wamp\www\login\register.php on line 6 "Notice: Undefined index: password …

Member Avatar for new_developer
0
103
Member Avatar for new_developer

Hi there, I am working on form validation, i want to validate "Name" input field value . I want that in "Name" input field no number can be input. Is there any function which search number/s from string ?? i.e if user inputs any number in that field with string …

Member Avatar for Taywin
0
139
Member Avatar for new_developer

hi there, If i made flash banner in Adobe Flash CS4, how we add it in website which is based on html and CSS. Thanx

Member Avatar for trancewebdesign
0
236

The End.