20 Topics

Member Avatar for
Member Avatar for iConqueror

I am wondering if a struct is like an object or is an object. For example a struct: struct Books { public string title; public string author; public string subject; public int book_id; }; Defining this struct: public class testStructure { public static void Main(string[] args) { Books Book1; /* …

Member Avatar for Ketsuekiame
0
157
Member Avatar for dudicus14

{file has 1000 lines that look like these 114680858 19670607 Matilda Vincent MI 114930037 19471024 Desdemona Hanover ID 115550206 19790110 Xanadu Perlman ND 116520629 19630921 Alexander Hall SD 117050976 19301016 David Lamprey GA 119610646 19650202 Thomas Porlock IL 120330928 19621126 Cary Cartman NC struct employees { int ss_number;//social security int …

Member Avatar for vmanes
0
142
Member Avatar for Jason_9

I'm totally new to programming and taking an intro class. When i prompt the user for a state code the program just exits, nothing in my book really goes over this and all im given is crappy youtube videos for reference. Any help is greatly appreciated. #include <stdio.h> #include <stdlib.h> …

Member Avatar for David W
0
249
Member Avatar for Kirielson

Hello everyone, I'm trying to implement qsort on a struct with the double as a pivot: typedef struct{ char sequence[9]; int occurance; double prob; }tuple; ...... int compare (const void *x, const void *y){ if (x < y) return -1; if (x > y) return 1; else return 0; } …

Member Avatar for deceptikon
0
699
Member Avatar for DelilahDemented

I'm trying to read information from a text file and populate an array of structs using a pointer. I keep getting an error and I'm not sure how to fix it. Any help, comments, or tips are greatly appreciated! Thanks in advance for your time and help! error: request for …

Member Avatar for Ancient Dragon
0
371
Member Avatar for n.cramp

Hi all, Having a little trouble with assigning values to an array within a C struct. Unfortunately i cannot assign a size to the array as i am reading values to an array to be stored, and the size is relative to the other values in the struct passed to …

Member Avatar for n.cramp
0
3K
Member Avatar for livinFuture

Hello all. I am having difficulty getting my program to output data correctly. I have a class member function that is supposed to return the value of a specific member of a struct element based on identification with its (the struct element's) other members. [code] float MatrixType::valueAt(int i, int j) …

Member Avatar for livinFuture
0
195
Member Avatar for vincenzorm117

I have been having trouble developing a function that frees all of the memory associated with structs of a linked list. Im not asking for a clear cut answer, just an idea or a function that can aid. F.Y.I. the linked list contains a head struct and a tail struct …

Member Avatar for sorry711
0
236
Member Avatar for jeffw362

I'm writing a program that takes records(first and last name,id and mark), reads them from a file and inserts the information in StudentRecord structures. For some reason,when I go to list the information, the first and last name strings in each structures are all the same. The first and last …

Member Avatar for nezachem
0
232
Member Avatar for C++newbie chick

Hello guys, I've tried searching the internet on how to cout a struct in an array via a binary search, but with no success. I've only learned how to do a linear search and I sort of understand how to do a binary search but: how do I cout the …

Member Avatar for C++newbie chick
0
2K
Member Avatar for gruffy321

hi all and thanks for reading. Personally i thought i wouldnt be in the frame of putting up one of my assignments, as i can see where an opinion might be formed, over me trying to pull as fast one and get someone to code this for me etcetc etc..... …

Member Avatar for WaltP
0
221
Member Avatar for oliviars22

I need to read data from a file into an array of structs. The info is arranged in the file like so... Spear of Extreme Whaling January 1851 Captain Ahab Each member of the array has a name, month, year, and first and last name of creator. This is the …

Member Avatar for thelamb
0
252
Member Avatar for bleedsgreen33

Hello everyone. I'm coming to you again because you all seem to be much more on the spot answering my questions than my professor. The long story short, we are being introduced to structs in my c++ class, and for the first assignment we are to do a simple Student …

Member Avatar for bleedsgreen33
0
139
Member Avatar for elsiekins

Hi - i have been trying to create a linked list in C using structs and there are a couple of things i am stuck with how to declare the node front and back and do i keep repeating myself? Also in the function push back how can i use …

Member Avatar for elsiekins
0
279
Member Avatar for J0shu

Hello everyone. I've been trying to implement a linked list in C++. I found this implementation on the web, where they created a struct for the list's nodes. When trying to add a new node to the list, I get this error: [B]List.C: In member function `bool Linked::addNode(Point)': List.C:23: error: …

Member Avatar for jonsca
0
531
Member Avatar for cshemby86

I have to load two arrays, merge the two arrays into a third array, then create a control break report on name while outputting the most frequent style, then sort the array by style and to a control break on style. Can someone look at my code and see if …

Member Avatar for cshemby86
0
253
Member Avatar for gpjacks

I really have no idea where to start. Please only respond if you actually want to help. Not to name names, but [B]some [/B]people on here are just rude. Here is the assignment and any advice will be [B]greatly [/B]appreciated! 1. Write a program that allows the user to enter …

Member Avatar for Fbody
-2
108
Member Avatar for Hyiero

[CODE] while(temp != NULL) { if(temp->info.Name == cName) { temp->info.DiscountNumber = temp->info.DiscountNumber + 5; flag = true; } if(temp ->info.DiscountNumber > 25) { temp->info.DiscountNumber = 25; // prev->link = temp->link; // delete temp; //temp->link = first; // first = temp; } //cout<<"Discount is :" //<<temp->info.DiscountNumber //<<endl; prev = temp; temp …

Member Avatar for Hyiero
0
724
Member Avatar for srinivaslvn

[CODE]<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="Player1" width="200" height="100"> <param name="URL" value="<s:property value="adFilePath"/>"> <param name="http://path_to_the_video"> <param name="AutoStart" value="0"> <param name="ShowControls" value="1"> <param name="ShowStatusBar" value="1"> <param name="ShowDisplay" value="1"> <param name="stretchToFit" value="1"> <embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/" width="200" height="100" src="<s:property value="adFilePath"/>" filename="<s:property value="adFilePath"/>" autostart="0" showcontrols="1" showstatusbar="1" showdisplay="0"> </embed> </object>[/CODE] Above code in the place file name i am …

0
83
Member Avatar for TinhornAdeniyi

Can someone tell me what wrong with this code i am supposed to create an array of struct of cars and then add 1 to the car sold then find the inventory value comprising of all car values this is my infile lexus IS 35000 10 bmw 740 90000 5 …

Member Avatar for TinhornAdeniyi
0
156

The End.