• Register

Recent questions tagged error

0 votes
1 answer 5 views
Problem: Hello! I am beginner. I was given a task by a teacher in which I had to write a program that takes input from user and tells whether their name starts with vowel or consonant. I could not build the logic myself so I copied following code from a ... run this program, it returns so many error message which I am unable to understand. Could anyone here please help me figuring out the errors?
asked 2 days ago Code Learner 5.5k points
0 votes
1 answer 19 views
Problem: I have this piece of code which creates a new note..WHen I try to print I get the following error even though it prints the output Error: C:\Python27\Basics\OOP\formytesting>python notebook.py Memo=This is my first memo, Tag=example Traceback (most recent call last): File "notebook.py", line 14, in <module> print(firstnote) TypeError: __str__ returned non-string (type NoneType)
asked Jan 8 Mashhoodch 5.6k points
0 votes
1 answer 6 views
Problem: File "/usr/local/lib/python2.7/dist-packages/sklearn/utils/multiclass.py", line 172, in check_classification_targets raise ValueError("Unknown label type: %r" % y_type) ValueError: Unknown label type: 'continuous' The input data is the same as in the previous calls, ... way, why there is a huge diference in the first prediction of LinearRegression() and SVR() algorithms (15.72 vs 3.95)?
asked Jan 7 Mashhoodch 5.6k points
0 votes
1 answer 29 views
Problem: Hello! I am a new learner. I recently started programming in C#. I learned the control statements in which I came across if, if-else, and switch statements. I tried the following program to have a better understanding of switch statement: using System; class HelloWorld ... label `case default:' I do not know what I have done wrong. Can anybody help me in figuring out what is wrong here?
asked Jan 4 Code Learner 5.5k points
0 votes
1 answer 20 views
Problem: Errors: ||=== terrac, Debug ===| C:\terrac\gameObject.cpp|4|error: redefinition of `class gameObject'| C:\terrac\gameObject.h|3|error: previous definition of `class gameObject'| ||=== Build finished: 2 errors, 0 warnings ===| I can't figure out what's wrong. Help?
asked Dec 27, 2020 Mashhoodch 5.6k points
0 votes
1 answer 7 views
Problem: I have the following error in my Calculator code and do not understand how to correct it. Please any advice would be helpful. ERROR: error: jump to case label [-fpermissive]| error:crosses initialization of 'int sum'| error: 'exit' was not declared in this scope|
asked Dec 26, 2020 Mashhoodch 5.6k points
0 votes
1 answer 18 views
Problem Hey, I Am getting an error request for a member which is of non-class typeI don&rsquo;t know how to resolve this error.Can somebody help me resolve it? This will be great for me to make me relax to solve problems. Here&rsquo;s my code Vector.h #ifndef VECTOR_H_INCLUDED ... #include <cassert> #include "Vector.h" using namespace std; int main() {    Vector<int> v;    //v.push_back(8); }
asked Dec 24, 2020 chris jordan 2.2k points
0 votes
1 answer 17 views
Problem Hey, I Am trying to convert the string to an array by using stoi. But it&rsquo;s showing an error &lsquo;stoi&rsquo; was not declared in the scope. I have a standard library and a string as well. Can somebody help me to correct the code that i have been given in the next ... init; string hours0 = init.substr(0,2); int hours = stoi(hours0); cout << hours << endl; system("pause"); return 0;
asked Dec 24, 2020 chris jordan 2.2k points
0 votes
1 answer 8 views
Problem: Apart from the system and semantic errors and exceptions that occur from time to time, we also get other critical errors that affect the running of programs. These errors mostly occur towards the end of the program at runtime. Sometimes the program gives proper output and then the error occurs.
asked Dec 23, 2020 Mashhoodch 5.6k points
0 votes
1 answer 32 views
Problem I am getting an error that is undefined reference to a constructor. Program.cc #include "words.h" #include <string>   using namespace std;   int main(int argc, char* argv[]){   string file = "words.txt";   Words w1(file);     return 0; } Word ... then print it out. I know there is something missing in this code.so please provide me the correct solution of this will be appreciative for me
asked Dec 22, 2020 chris jordan 2.2k points
0 votes
1 answer 8 views
Problem Hey, I was writing a class for finding the average of grades outside the class but I Am facing an error named expected initializer before token. Can someone help me to resolve this error Here is my code Program:  #include <iostream> using std::cout; using std::cin; ...   computeAverage = computeAverage + gradeAverage.getGrade();     }     cout << computeAverage/5 << endl;     return 0; }
asked Dec 22, 2020 chris jordan 2.2k points
0 votes
1 answer 5 views
Problem Hey I Am facing an error in my calculator code. I don&rsquo;t know how to resolve this error. Will you please help me to resolve this or any other help? Here&rsquo;s my code Program: #include <iostream> #include <cmath> using namespace std;          void display_menu();  int get_menu_choice(); void ... b)   {    return (a + b);   }  int subtract(int a, int b)   {     return (a - b);   }
asked Dec 21, 2020 chris jordan 2.2k points
0 votes
1 answer 6 views
Hey, I Am using the 2010 edition of visual studio express and there is an error named access violation reading location occurring when an object of class opens and closes a file. U don&rsquo;t know what&rsquo;s wrong with this if ... reading location 0x00000004. Unhandled exception at 0x6081aa1e (msvcp100d.dll) in test_fstream_use.exe: 0xC0000005: Access violation reading location 0x00000004.
asked Dec 20, 2020 chris jordan 2.2k points
0 votes
1 answer 2 views
Problem Hey, I just want to know what are nested classes?
asked Dec 19, 2020 chris jordan 2.2k points
0 votes
1 answer 12 views
Problem: Once you loop through a string as an array, can I check if the entered string is an integer variable? For example: You enter hello and it asks you to enter the variable again since it is not a whole number. int main () { string string; cout << "Enter string" << endl; cin >> string; string :: iterator i; for (i = string.begin (); i <string.end (); i ++) { cout << * i << endl; } return 0; }
asked Dec 4, 2020 sasha 5.3k points
0 votes
1 answer 35 views
Problem: I am working on functions in C++. I am facing the above mentioned error while I am trying to run the following program: #include <iostream> using namespace std; int main() { cout<<func(4); } int func(int number) { return number; } I have no idea about the error. Why this error is being triggered and how can I resolve this issue?
asked Nov 10, 2020 Code Learner 5.5k points
0 votes
1 answer 75 views
Problem: I have been working on classes in C++ for about a few days. I am learning constructors with parameters. I was trying to run the following program in which I have declared two constructors, one without parameters and other with one parameter. The problem ... The program works perfectly when I comment out the error-generating statement. I have no idea what I am doing wrong. Please Help.
asked Nov 9, 2020 Code Learner 5.5k points
0 votes
1 answer 10 views
Problem: Hi there! I am a newbie and started learning programming recently. While doing programming, as a beginner I encountered many errors but the most rapidly occurring error was &ldquo;C++ requires a type specifier for all declarations&rdquo;. Although, I managed to resolve the error everytime, I want to know why this error is generated and how can I avoid it?
asked Nov 5, 2020 Code Learner 5.5k points
0 votes
1 answer 8 views
I'm installing python on my windows 10 laptop, and when I try to run it I get this. Fatal Python error: Py_Initialize: unable to load the file system codec ModuleNotFoundError: No module named 'encodings' Current thread 0x0000037c (most recent call first):
asked Oct 25, 2020 psandprop 2.4k points
0 votes
1 answer 21 views
Please explain the following about "Cannot find symbol", "Cannot resolve symbol" or "Symbol not found" errors in JAVA?
asked Sep 28, 2020 Xaimax 9.5k points