177 Topics

Member Avatar for
Member Avatar for Nethran

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 …

Member Avatar for Nethran
0
345
Member Avatar for Alexkid

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 …

Member Avatar for Gonbe
0
264
Member Avatar for tealpenguin

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 …

Member Avatar for NathanOliver
0
215
Member Avatar for restrictment

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 …

Member Avatar for restrictment
0
256
Member Avatar for muhammad.khan.3576

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 …

Member Avatar for Ancient Dragon
0
276
Member Avatar for CodyM

/*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 …

Member Avatar for CodyM
0
212
Member Avatar for RozenKristal

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 …

Member Avatar for jalpesh_007
0
223
Member Avatar for anisha.silva

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 …

Member Avatar for caKus
0
233
Member Avatar for ziggydog

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 = …

Member Avatar for ziggydog
0
174
Member Avatar for razorsky

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 …

Member Avatar for j.c.
0
9K
Member Avatar for agentc0re

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 …

Member Avatar for agentc0re
0
273
Member Avatar for jongiambi

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 …

Member Avatar for jongiambi
0
401
Member Avatar for AlexSmith069

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 …

Member Avatar for owenransen
0
116
Member Avatar for superchica08

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 …

Member Avatar for superchica08
0
266
Member Avatar for niyasc

Can anybody share the algorythm to perform inorder traversal of a binary search tree using parent node(without stack or recursion)

Member Avatar for deceptikon
0
159
Member Avatar for trishtren

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 …

Member Avatar for trishtren
0
178
Member Avatar for baby_c

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 …

Member Avatar for Banfa
0
750
Member Avatar for benjaminpelc

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 …

Member Avatar for benjaminpelc
0
259
Member Avatar for danielsikes

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 …

Member Avatar for rotten69
0
208
Member Avatar for drjay1627

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 …

Member Avatar for mschroeder
0
195
Member Avatar for belenos46

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 …

Member Avatar for belenos46
0
186
Member Avatar for mike_2000_17

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 …

Member Avatar for mike_2000_17
0
673
Member Avatar for tischn

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; …

Member Avatar for tischn
0
136
Member Avatar for TarkiB

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 …

Member Avatar for TarkiB
0
3K
Member Avatar for jimjones371

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 …

Member Avatar for gusano79
0
281
Member Avatar for pce369

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 …

Member Avatar for pce369
0
121
Member Avatar for needforkevin

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 …

Member Avatar for needforkevin
0
240
Member Avatar for Dmiller071

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 …

Member Avatar for Dmiller071
0
271
Member Avatar for abed1986

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> …

Member Avatar for abed1986
0
803
Member Avatar for nik2012

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. …

Member Avatar for nik2012
0
1K

The End.