» Home » MyItem » Page 1
c++ cpp conversion from 'myItem*' to non-scalar type 'myItem' requested
Category : Programming Languages

i have this code


struc MyItem
{
var value
MyItem* nextItem
}
MyItem item = new MyItem;

And I get the error:


"c++ cpp conversion from 'myItem*' to non-scalar type 'myItem' requested"


Compiling with g++


Any ideas?


Thanks!


View Replies


Making List<MyItem> objects Equal?
Category : Programming Languages

I'm making a few test cases and noticed I needed to check to see if MyObject was Equal to another MyObject.


I created my Equals methods like so:


public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
return obj.GetType() == typeof(MyObject) && Equals(

View Replies


Call controller method with List<MyItem> parameter via ajax
Category : Programming Languages

I have this class in my c# code:


public class MyItem
{
public int LocationId { get; set; }
public int Value { get; set; }
public int ddlId { get; set; }
}

Here is my Js/Ajax code:


var array = new Array();
grid.forEachRow(function (id) {
var object = {
Lo

View Replies


How to improve compare of item in sorted List<MyItem> with item before and after current item?
Category : Programming Languages

Does anyone know about a good way to accomplish this task?


Currently i'm doing it more ore less this way, but i'm feeling someway unhappy with this code, unable to say what i could immediately improve.


So if anyone has a smarter way of doing this job i would be happy to know.


private bool Check(List<MyItem> list)
{
bool result = true;
View Replies


Next
2012 / 2017 Copyrights BigHow , All Rights Reserved .