177 Topics
|
|
First off, some setup. I'm doing the final course project for my C++ class, and this is the first time I've had trouble. The things I'm supposed to be doing in this assignment seemed a lot simpler before I started working on this, and now I'm just hitting walls. The … |
|
Hi there I need help writing a data structure to hold and assign data to a particular unique ID. I think I want an vector of structures: struct Data { int ID; double latitude; double longitude; int speed; int altitude; }; I receive messages in the above format, they can … |
|
I'm having trouble with a couple of things in my program. I want to create 3 different players and then record their scores to a file called highScores.txt I need to also come up with another game that features an array in it (i would put this in the place … |
|
Hey everyone, I am taking an online C++ class and part of our assignment is to complete a whole bunch of small program snipits on a site called myprogramminglab.com. This one program seems to have me stumped as I am not very familiar with Data structures. Could someone help me … |
|
1. You are required to make a structure named “section”. The names of the two sections are secA and secB. 2. There are two members of this structure i.e. numberOfBoys and numberOfGirls. 3. In secA there are 48 boys and 6 girls while in secB there are 50 boys and … |
|
/*I'm having trouble creating a constructor for degree and *coeffs as well as properly creating the dynamic arrays for the coefficients of the 2 polynomials a and b. I'm just concerned about getting the correct values. My textbook only gives us eamples of constructos for eamples not well related to … |
|
import java.util.*; public class List { public static INode head; public List() { head = new INode(8); } public static void main (String[] args) { INode a = new INode(8); int data = a.getValue(); System.out.println(data); System.out.println(head.getValue()); } } And my Node class: public class INode { private int value; private … |
|
hi, so i have a question relating to sending data in a sequence. i have a class evenvent that reads the data from a txt file. that class has to send data to 2 comunication line async and sync. data sent to async is for ex: 'new' . data that … |
|
Hi everybody I am populating an array of structures with info for a product enquiry. <!--- ADD PRODUCT TO CART ARRAY ROUTINE---> <cfif IsDefined("btn_add")> <a href="%5C"> <cfset temp = arrayAppend(session.enquirycontents, structNew())> <cfset session.enquirycontents[arrayLen(session.enquirycontents)].ID = #form.ID#> <cfset session.enquirycontents[arrayLen(session.enquirycontents)].product = #productdetail.product#> <cfset session.enquirycontents[arrayLen(session.enquirycontents)].prodnum = #productdetail.prodnum#> <cfset session.enquirycontents[arrayLen(session.enquirycontents)].quantity = #form.Quantity#> <cfset session.enquirycontents[arrayLen(session.enquirycontents)].dimensions = … |
|
After much searching I cannot find a particular way to get a datafile into my structure. I understand how to create and manipulate the structure. C does not play nicely with strings is another thing I have noticed. I have tried many examples of how to do this but none … |
|
I am currently in an introductory c++ class and am working assignment that sorts data. We recently covered structs and I decided to use structs to approach the problem rather than create 3 arrays to hold the information from our data file. The trouble i'm having is when i'm trying … |
|
Can anyone help me with this constructor problem? In main: instantiate one date object (date1) using the default constructor just to see that the constructor works, print the month, day, and year of date1 using the getters get input from the user and use the setters to set the values … |
|
i am writing this code for a school poject it gives mee segmentation fault .please help it scans iput of the form #include<stdio.h> #include<stdlib.h> struct time{ int hh,mm; }; struct date{ int day,month,year; }; struct student{ char firstname[20]; char lastname[20]; struct time entry; struct time leavetime; struct date dt; int … |
|
hello everyone I was wondering if anyone could explain big-oh estimate to me for c++ data structures. I do not understand it that much and does anyone know of any good websites that have good information on c++ data structures i would greatly appreciate it. Also could anyone explain to … |
|
Can anybody share the algorythm to perform inorder traversal of a binary search tree using parent node(without stack or recursion) |
|
Hello, I am trying to recreate a data type in java used by adobe, it is an unsigned integer 30 bits long or U30 by the specification. Anyway i am having problems understanding the binary output, the definition states: "The variable-length encoding for u30 uses one to five bytes, depending … |
|
hey friends i need help once again... i need to know that how to accessing a structure in another function using pointers.i mean when we returning a pointer to the main function we have have the address of the structure.how to use that address to access the structure..pls guys help … |
|
Hi, I am trying to write code to read a text file containing velocity vector data in the form x, y, u, v. An example of the data file I am opening is: 0 1.0 3.24 45.64 1.5 2.5 54.34 23.45 ... I have a function which can read the … |
|
Hi, I have a database table structure that works as follows: search_id: (auto int) group_id: (unique to group) field_name: field_value: so some entries in my db would look like this: search_id group_id field_name field_value 1 123456 fname John 2 123456 lname Doe 3 123456 email jdoe@abc.com 4 789012 fname Jane … |
|
Hello, I am building a blog - just to shapen my skills. Since leaving college I feel like I have been loosing my programming edge. I work in IT and I primarily work on Oracle databases as a developer. Here is what I am building - a blog. I have … |
|
So, I'm automating a payment import system, writing the whole thing from scratch. It has to pull data from excel files (including extraneous data that we need to discard), process it, and insert it into a database. Oddly, those aspects are going quite well. However, I'm running into a problem … |
|
I am currently working on kind of multi-graph structure. The thing is that two graphs are needed for my application which span the same vertices but with two distinct set of edges (i.e., a multi-graph). The first graph is a binary search tree, while the second graph must be general … |
|
Hi i had never before used structures, so i am a complete noob ;) . this is a small Part of my programm: struct player { int var1; int var2; int var3; int var4[10]; int var5; int var6; }; struct player p[4]= {{1000,0,0,{0,0,0,0,0,0,0,0,0,0},0,1}, {1000,0,0,{0,0,0,0,0,0,0,0,0,0},0,1}, {1000,0,0,{0,0,0,0,0,0,0,0,0,0},0,1}, {1000,0,0,{0,0,0,0,0,0,0,0,0,0},0,1}}; printf("%d\n"), p[0].var1; printf("%d\n"), p[0].var2; … |
|
Hi there, As the title says, I'm having an issue passing an array of structures to a function.The structure reads and tokenises information from a text file. I then need to do things with that data using several different functions. Here's my code: #include <stdio.h> #include <stdlib.h> #include <string.h> typedef … |
|
Need help from daniweb community. I suck at programming. It doesn't make sense to me. I'm not going to be programming in my career but it's part of my major. I'm desperately trying to get an c- just to pass. Would love some help. I would appreciate some explanation but … |
|
I am having trouble figuring out how to get a user inputted value into a structure I've created to make a linked list of stacks. The structure and pointer info before main() are: struct inforec { int item; }; struct node; typedef node *PT_NODE; struct node { inforec info; PT_NODE … |
|
hello! i have written a program to read in a text file and then ask the user to process the file with a different sorting method. so far i have been able to get my program to read in the file but my bubble sort seems to not be sorting … |
|
Hi all, I have a project where I need to read in an image of a maze and use a graph data structure to find certain points in the maze to place nodes and trace edges. I plan to have the maze be in only two different colors. The walls/background … |
|
Hello everyone, I have a program that intends to create a doubly linked list of structures, using the following header (q1.h): [CODE=c]typedef struct lNode* ListNodePtr; typedef struct lNode { char* string; ListNodePtr next; ListNodePtr prev; } ListNode; [/CODE] This is my implementation: [CODE=c]#include "q1.h" #include <stdio.h> #include <stdlib.h> #include <string.h> … |
|
Hello. I am learning C++, and I am a little stuck. Right now, I'm working on pointers. The problem I'm working on requires sorting an array of structures, using pointers instead of array indices, using a selection sort. My code is not working, and I can't quite figure out why. … |
The End.