No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Computer science geek
- Interests
- sports, computer programming competitions and video games
5 Posted Topics
Re: The problem is with your tree construction , binary trees have the rule that all nodes are less than every node in their right substree and greater than or equal to nodes in their left subtree.There is no where in your code where you extract each individual character of the … | |
![]() | Re: void allPerfect(int end) { for(int i = 1;i <= end;i++) { if(isPerfect(i)) System.out.print(i+"\n"); } } Thats what the isPerfect() implementation will look like , since you only print the number if it's perfect and that is determined by isPerfect() which returns either true or false |
Hey guys i'm having a lil trouble with object serialization. student * s = new student("Mike",200014); ofstream ofs("student.dat",ios_base::out | ios_base::binary); ofs.write((char*)&s,sizeof(s)); ofs.close(); If student was a class with attributes `studentName:string` and `studentNumber:int` would the above code write the object pointed by s to the file `student.dat` ? | |
Re: it should be `if((BMI >= 18.5) && (BMI < 24.9)){}` And its always a good idea to use round brackets in you if statements as the compiler can be a bit of an anoyance sometimes | |
Hey guys i have an advanced programming project , which is to run on both linux and windows operating systems. And i wanted to know if there is an IDE with drag and drop features which i can use to code the graphical user interface |
The End.