C Sharp :: To Create Globe List Of Templates

Jun 23, 2012

//////////////////////////////////////////////
struct FaceTemplate {
public byte [] templateData;
}
List <FaceTemplate> faceTemplates;
////////////////////////////////////////////

I want to create this structure as globally to access this list in every window form. how can i create and how cam i access.

View 1 Replies


ADVERTISEMENT

C++ :: Linked List Using Templates

May 27, 2014

I decided to make a linked list program using classes and templates.I implemented my linked list and added some basic functions, everything worked just fine. Then I proceeded to add templates...First, the error list:

#pragma once
template<class T>
class Node {
private:
Node* next;

[code]....

To sum up: Something's wrong with the templates that I used in "List.cpp" and what it could be.

View 5 Replies View Related

C/C++ :: Array And Linked List With Templates

May 1, 2014

I am having problems implementing ArrayList using templates. I was given a program and I have to create this implementation to make it work. It keeps giving me an error "invalid operands to binary expression" .....

ifndef Final_4_ArrayList_hpp
#define Final_4_ArrayList_hpp
#define MAX 10;
#include "List.hpp"
template <class T>
class ArrayList : public List <T> {

[Code] ....

View 1 Replies View Related

C++ :: Setting Up Linked List Class With Templates?

Dec 2, 2013

I am trying to implement a linked list using a class template, however each of my classes that I want in the list all inherit from an Account class. I have attempted to template the linked list class as account however Ive come into errors I can't resolve. How I can go about this?

The error exists within the customer.cpp class where it says

14IntelliSense: a value of type "Account *" cannot be assigned to an entity of type "CurrentAccount *"f:Further C++Assignment with TemplatesAssignmentCustomer.cpp229Assignment

Customer class:

#ifndef CUSTOMER_H
#define CUSTOMER_H
#include <iostream>
#include <string>
#include "Account.h"
#include "AccountLinkedList.h"

[Code] .....

View 2 Replies View Related

C++ :: Can Use Templates To Make A Multi-type Linked List?

Apr 28, 2014

If I wanted an int connected to a float connected to a string connected to a POD, would all I have to do is :

Code:

template<class T, class X>
struct node {
T data;
node<X> *next;
};

Or would I be forced into using polymorphism?

View 10 Replies View Related

C++ :: Reading GLOBE File - Access Violation Writing Location 0x00000001

Jan 15, 2015

I am working Visual C++ 2012. I am trying to read a GLOBE file using the following code.

#include "stdafx.h"
#include "iostream"
#include <stdio.h>
#include "stdlib.h"
#include "string.h"
#include "cmath"
#include <errno.h>
using namespace std;
/* Conversion useful */

[Code] ....

I am getting the error in the if condition (bold).

View 12 Replies View Related

C Sharp :: Create Xml File From Xml Stored In A DB

May 15, 2013

I have a table in my database that has a 3 fields.

RuleID | RuleName | Rule

the ruleID is a randomly generated string of characters, RuleName is the name the user gives to the rule, and the Rule field is about 600 characters long and is just XML text.

I want to read that Rule field from the database and use it inside the function below.

private static List<MenuItem> LoadRules(bool evaluationType)
{
//string path = HttpContext.Current.Server.MapPath(string.Format("/Rules/{0}/{1}/", ip, evaluationType ? "Evaluation" : "Execution"));

[Code]...

This function loads an xml file from a static location and parses out some information to a context menu.

BUt i'm culeless on how to have the function read the xml info found inside my database.

View 1 Replies View Related

C Sharp :: How To Create Excel File In C#

Dec 28, 2013

I am currently having issues with the following code when trying to create a excel file using C#. This is the code that I have at the moment.

    oXL = new Microsoft.Office.Interop.Excel.Application();
            oXL.Visible = false;
            oWK = (Microsoft.Office.Interop.Excel._Workbook)(oXL.Workbooks.Add(System.Reflection.Missing.Value));
            oWK.SaveAs(path + "" + fileName);
            oWS = (Microsoft.Office.Interop.Excel._Worksheet)oWK.Worksheets.get_Item(1);
            oWS.Cells[1, 1] = "Student ID";
            oWS.Cells[1, 2] = "Student Name";
            oWK.Save();  

The line that I am having issues with is

oWS = (Microsoft.Office.Interop.Excel._Worksheet)oWK.Worksheets.get_Item(1);

If I remove it, I am able to create and save teh workbook in the directory. However, I want to make some changes on a worksheet, and that is where the issue is. I have also tried using the line of code:

oWS = (Microsoft.Office.Interop.Excel._Worksheet)oWK.Worksheets[1];

This line had no luck either. The issue I am having is the error regarding InvalidOperationException: Dynamic operations can only be performed in homogenous AppDomain.

View 2 Replies View Related

C Sharp :: Create A DropDownList (Hardcoding Data)

Apr 3, 2013

I am using MVC3 (C#) and I need to hard code the data in a DropDownList.

View 2 Replies View Related

C Sharp :: How To Create Manual Printer Settings

Jan 19, 2014

My professor assign me a task to create a manual printer settings, not necessary same as printer setting the important thing to do is to have a combobox. In the combobox that you will see the available installed printers, and one command for print that if going to select one available printer in the combobox. It is possible ?

View 1 Replies View Related

C Sharp :: How To Create Multiple Word Documents Dynamically

Sep 18, 2013

Need to create multiple word documents on the run.

My problem is its creating the last one only.

View 1 Replies View Related

C :: Create A Linked List And Then Reverse It?

Apr 9, 2014

I am trying to create a linked list and then reverse it. So far I have created the link list however I am having difficulties figuring out the steps to reverse it. What is the logic behind reversing this linked list. I am not able to use recursion. I am supposed to create a copy of the linked list with the nodes reversed.

Code:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct charNode {
char data;
struct charNode *nxtNode;
};

[Code]...

View 4 Replies View Related

C++ :: List Of Functions That Can Create A Unique ID

Nov 4, 2014

I'm working on a list of functions that can create a unique ID for a computer. Here's what i have so far:

GetAdapterInfo();
RegOpenKeyEx();
GetVolumeInformation():
CoCreateGUID();

Are there any other functions that do this?

View 1 Replies View Related

C# :: Create A Button For Each Item In A List

Jan 26, 2014

Basically, the program is just sort of a soundboard. The way it is now, it just reads all the names of the files in a particular folder (all .wav files), and then adds an entry to a listBox for each file found. What I would like to do, is instead of a listBox, have buttons for each one. Is there any way to iterate through a list of items and create a button for each one? The main problem I see is placing the buttons. It would have to have some sort of grid to place them in I would imagine...

View 3 Replies View Related

C Sharp :: How To Bind DropDown List

Feb 16, 2013

<asp:TemplateField HeaderText="Group_Id"> 
<ItemTemplate> <asp:Label ID="G1" runat="server" Text='<%# Eval("Group_Id") %>'></asp:Label> 
</ItemTemplate> <EditItemTemplate> <asp:TextBox ID="G2" runat="server" Text='<%# Eval("Group_Id") 

[Code] ....

on running i find this error

Compiler Error Message: CS1061: 'ASP.webform12_aspx' does not contain a definition for 'Group_Item_Name_SelectedIndexChanged' and no extension method 'Group_Item_Name_SelectedIndexChanged' accepting a first argument of type 'ASP.webform12_aspx' could be found (are you missing a using directive or an assembly reference?)

Source Error:

Line 143: </EditItemTemplate>
Line 144: <FooterTemplate>
Line 145: DropDownList ID="G3" runat="server" AutoPostBack="True"
Line 146: onSelectedIndexChanged=" Group_Item_Name_SelectedIndexChanged" Width="133px">
Line 147:</asp:DropDownList>

View 1 Replies View Related

C Sharp :: Convert A List To Buttons

May 27, 2012

I have a txt file of drinks, and I want to meak a list of buttons of it (the txt file is build like this: fanta : 2 ), how can I make buttons of all the drinks ( I get the first one in a button , but not the others).

Dictionary<string, double> drank = new Dictionary<string, double>();
     string[] words = new string[8];
     Button button;
     <Button> BtnList = new List<Button>();

[Code] ....

View 1 Replies View Related

C :: Create Function That Allows Insertion Anywhere In Linked List

Feb 18, 2013

I'm trying to create a function that allows insertion anywhere in a linked list...here is what I have so far but am a bit confused on where to go from here

Code:
void llAddAtIndex(LinkedList** ll, char* value, int index) {
LinkedList* newNode = (LinkedList*)malloc(sizeof(ll));
newNode = *ll;
LinkedList* prevNode = (LinkedList*)malloc(sizeof(ll));

[Code].....

View 7 Replies View Related

C :: Program That Allows A User To List All Create New Items

Dec 30, 2013

i want to create a program that allows a user to list all create new items, list those items, delete an item, modify an item, search for an item how can i do that This is my work so far

Code:

#include <stdio.h>
#include <string.h>
struct listofitems
char itemName [50];
float itemPrice = 0;
}

[code]...

View 1 Replies View Related

C Sharp :: Convert Dropdown List To Int Datatype

Mar 16, 2013

I am need to compare 2 items from 2 separate drop down lists. These values are of int type. Say for example 2 drop down lists showing years. Now i need to find out these 2 years selected is greater or nearer to the current year.

I tried converting the values i receive from the drop down lists to int variables. But i am getting error then. I gave it like below.

int tmp = Convert.ToInt32(ddl_1.SelectedItem.Text);

this gives an error like this - Input string was not in correct format.

I need to know how to put an item from a drop down list to a variable of int data type.

View 1 Replies View Related

C Sharp :: Using List Elements As Variable In Query

Aug 27, 2014

I am trying to query an Informix database using a List<T> collection's elements as variables. I can build the list and connect to the database, but I am unsure how to iterate through the list and query the database for each item in the collection.

My list is of type string, and contains Order Numbers. I want to query item information for each order number in the list.

View 1 Replies View Related

C :: How To Create Double Link List For 2 Level Hierarchy

Jun 11, 2014

I have to create a 2D link list with 2 level hierarchy

some thing like that

Code:
head nodes level 1: 0 1 2
/| / /|
Sub node level 2: 0 1 2 0 1 0 1 2
Real Data under |
each sub node: |

int **join=Null;
int unique = 0;
int col;
int ptr;
int *tmp_perm=Null;
int col_elem;

I know how to deal with 1 level link list structure. But i don't know how to access, delete, nodes and sub nodes from this 2 level hierarchy. C

View 4 Replies View Related

C :: Create Polymorphic Linked List Library File?

Sep 10, 2013

Linked lists seem to be the most erroneous and most frequent thing I use and post about nowadays. I've been wanting to handle data structures in my own library of functions, but I'm not sure how to imitate polymorphism without too many ambiguities. I could just pass some character or string value to represent a type, but I wanted to see if there was actually something more elegant I could use before I dive in.

View 4 Replies View Related

C :: Create List With Employees Of Company Using Binary Trees

Dec 5, 2013

My colleague and I have been given a task to create a list with the employes of a company using binary trees. Each employee/node has to contain the following information:

- Employe name
- Rank
- ID Number
- monthly Salary

We have to write a C program (using Codeblocks) which builds the company tree with the information above and afterwards lists all the employes who have a salary bigger then a number specified by the user.

So far so good. We've had a look on the examples on the internet and after finding one which looked friendly enough we started working on that one to suit our needs. Credits for the original source code to: C Program to Implement Binary Search Tree Traversal - Basic C Programs | C Programming Examples

We've reached the point where we're able to insert the required information but being able to list all the employes who's salary is bigger then the number given by the user seems to be rather difficult to achieve. I'll include the code next. We have left almost the entire pieces of the original code and we are aware that the are still things which are not required for our assignment, which only requires to enter the 4 information above and afterwards display the employes with the before mentioned condition concerning their salary.

Code:
# include <stdio.h>
# include <conio.h>
# include <stdlib.h>
typedef struct BST

[Code] .....

View 1 Replies View Related

C Sharp :: Display SQL Database Record In List View Using C#

Oct 6, 2012

I want to display the content of my database in list view. The table has 5 columns however when I tried this code

string view = "Select * from cust_infor";
SqlCommand cmd = new SqlCommand(view,FL.clsconnection.opencon());
            SqlDataReader dr = cmd.ExecuteReader();
            listView1.Items.Clear();  
            while (dr.Read())  {
                listView1.Items.Add(dr[0].ToString()).SubItems.Add(dr[1].ToString());  
           }  

It limits the display to 2 columns. List view will only show the first 2 columns. The code above won't let me add more indexes or subitems. Only up to 2 columns.

View 1 Replies View Related

C Sharp :: How To Loop Through Array List For Unique Values

Aug 19, 2012

I am grabbing data from three entities and want to grab a field value in each of the entites and place it in an arraylist. What I would like to do is loop through the arraylist for all the values and do something for each value only once. If the value in the array list is repeated, I want to not do anything for it and continue till the end. Basically, I loop through all the values do something for each value and skip over the repeated value if I already did something.

View 1 Replies View Related

C Sharp :: Storing Positions Of DrawRectangle Into A List - Only Stores Last X And Y?

Oct 12, 2012

I am trying to store values of X and Y into a list like this:

if (pictureBox1.Image != null) {
                    draw = true;
                    Graphics g = Graphics.FromImage(imageFile);
                    Pen pen1 = new Pen(color, 4);
                    g.DrawRectangle(pen1, e.X - 3, e.Y - 2, 5, 5);

[Code] ....

It stores all the nodes but it stores them as the same position, I am not sure how to make them act independently.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved