109 Topics
|
|
In structure hen i read floating point value from user and i get the error like"floating point not conneted..." i have been sugested to write two lines for that extern void float conetor(); #pragma extref floatconnector even though i got the same error it is not even asking for float … |
|
Hi, I'm a beginning C++ student and have an assignment to dynamically create an array of a struct to store students' first names, last names, and test grade scores, and then pass it via pointer to a function that will sort the grades and names in ascending order. I wrote … |
|
Hi all, How to find the offset of a structure member just by knowing the structure name and the address of that member????? For ex. [CODE]Struct cook { int a; int b; char c; }eat; void func(int *ptr) { //how to find the base address of structure. //I know only … |
|
Hi all, How to find the base address of a structure ,just by knowing the name of the structure and a address of one of its members. Thanks in advance |
|
Is it possible to find the offset value similar to offsetof() function when i know only the structure name and the address of the member of structure. For ex in offsetof , the structure name and the member name is given to find the offset. Similarly is it possible to … |
|
Hi, I'm trying to create a 2D grid that would allow me to use fluid properties in each cell of the grid, which is defined by a struct. I have 3 grids: [CODE=c]Grid2D <fluidProperties> grid1; Grid2D <fluidProperties> grid2; Grid2D < fluidProperties> grid3;[/CODE] My struct fluidProperties contains 12 different properties: [ICODE]struct … |
|
i create small application in struts but it give me following error : SEVERE: Servlet.service() for servlet jsp threw exception java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491) at org.apache.struts.util.MessageResources.<clinit>(MessageResources.java:57) at org.apache.struts.taglib.html.FormTag.<clinit>(FormTag.java:93) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at org.apache.jasper.runtime.TagHandlerPool.get(TagHandlerPool.java:126) at org.apache.jsp.Index_jsp._jspx_meth_html_005fform_005f0(Index_jsp.java:109) at org.apache.jsp.Index_jsp._jspService(Index_jsp.java:87) at … |
|
Although [url=http://en.wikipedia.org/wiki/Roman_numerals]roman numerals[/url] sneak in our lives from time to time, we(luckily) don't use them very often. Probably the reason why the Romans where not that good at calculating things. That changed, more than 1000 years later, with [url=http://en.wikipedia.org/wiki/Fibonacci]this person[/url] who introduced to the Western world the number system we … |
|
Hi all, I am currently extending a large C project with an own extension and I am stuck in a pointer/array/struct problem: The project offers a struct of this structure [CODE]struct ip_addr{ unsigned int af; /* address family: AF_INET6 or AF_INET */ unsigned int len; /* address len, 16 or … |
|
Hello, I'm new to assembly and am finding myself porting someone's MASM old code to C++ for portable smartphone architectures. There's a syntax on the memory addressing I'm having trouble interpreting. Can anyone help me understand what's going on? It's probably an easy question for everyone familiar with the syntax, … |
|
Ok this is my situation I have this header file: [CODE]struct dir { char name[3]; int root_dir; int has_children; int num_children; int offset_to_children[2]; int offset_to_files[16]; }; struct files { char name[5]; int size; int offset_to_beginning; int has_fragment; int next_fragment; }; struct fat { int files; int dirs; struct dir *dir_array; … |
|
Hi guys, Is there a difference between these two: struct->variable struct.variable ? |
|
I want to use hash_map with struct values. The code is the following: [CODE]#include<stdio.h> #include<string.h> #include<hash_map> using namespace std; using namespace __gnu_cxx; struct row { int number; char type; }; struct eqstr { bool operator()(const char* s1, const char* s2) const { return (strcmp(s1,s2)); } }; int main() { hash_map<const … |
|
please help me to create a student information portal using stucture and union program in c.it should contain five sudents. *for inputs we should use struct and for output we should use union and it also should have a controls...previous page, next page and escape for exit. i don't know … |
|
Hi there, I am coding for an engine based on C that supports everything apart from arrays. Now what I want to do is this: [code] int Populate(int Amount, string TagArray[], float xLoc[], float yLoc[], float zLoc[], float Orient[]) { int AutoInc = 0; while(AutoInc < Amount) { int a … |
|
My professor has thrown me a curve ball with this next assignment. The assignment is to make a Monthly Accounting Statement, the program is to you structs and arrays. I get how you can have an array of structs, arrays within a struct, etc... I have the program mapped out … |
|
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 … |
|
After a few months of learning and practicing C++ with the book C++ Primer Plus through Chapter 7, I decided to do myself a little simple program. I started with the decision to try splitting my program into multiple files, and I decided to collect all shared declarations/definitions (*) into … |
|
Hi all, im am writing a program to take in and store a student's grade as an int. Can anyone tell me please how do i get the average score of the grade? This is what i have so far... Regards. [CODE]#include "stdafx.h" #include <iostream> #include <iomanip> using namespace std; … |
|
Hey everyone, I've got a question about something called struct tm. I'm not really even sure if it is a string, array, or what, otherwise I would've said that instead of 'something'. I need to know how to use it. I've been searching the internet for the past hour, and … |
|
Hi there, im trying to create a quiz program in c++. I need to have an array within a struct as i need to store a question title, ten possible answers and the points that each answer is associated with any help about how to go around declaring this would … |
|
Deck.h [CODE]#ifndef DECK_H #define DECK_H class Deck { public: struct card{int symbol; int value;}; card card_list[52]; void generate_deck(); void main(); private: static int const diamond = 1; static int const club = 2; static int const heart = 3; static int const spade = 4; }; #endif [/CODE] Deck.cpp [CODE] … |
|
I have this struct for an item in a to-do list [code=c] struct Task { char description[TASK_DESC_SIZE]; /* description of the task */ int priority; /* task priority */ }; [/code] i'm just not sure how to alter the description while making a task using this [code=c] TYPE createTask (int … |
|
I have displayed an array in which I have added numbers in. Numbers 1 through 9, with 9 being a sentinel value. That I cannot figure out how to assign these numbers to the corresponding indicies. Please, please help [CODE] #include <iostream> #include <iomanip> #include <string> #include <fstream> using namespace … |
|
Hello, I'm new to this thread but have referenced to it before many times. I have finally joined thanks to all the great responses I have read in the past. Okay, I recieved an assignment which is as follow... "Declare a dynamic array of Person to store the information of … |
|
[CODE] #include <stdio.h> #include <string.h> typedef struct { char firstName[50]; char lastName[50]; int age; }Person; void ModifyPerson(Person*); int main() { Person person; strcpy(person.firstName, "firstName"); strcpy(person.lastName, "lastName"); ModifyPerson(&person); printf("First Name=%s\nLast Name=%s\n",person.firstName, person.lastName); system("PAUSE"); } void ModifyPerson(Person *p1) { //This doesn't modify the original variable declared in main function Person person = … |
|
Hello DaniWeb, I am pretty new to this community and overall to the C++ language. Not so long ago i've decided to learn C++. Anyways the problem is: I am trying to make a simple calculator, its very easy my problem is i am trying to advance my knowlege about … |
|
I'm supposed to write a tcp server program which writes into a file a record as structure. The code is given below: [code] int n,i; cout<<"Enter number of student records"; cin>>n; for(i=0;i<n;i++) { cout<<"Enter id,name,average mark"; cin>>r[i].id>>r[i].name>>r[i].mark; } [/code] [code] int i,n1; FILE *fp; FILE *file = fopen("db.dat", "wb"); cout<<"Writing … |
|
0 down vote favorite I'm trying to figure out how exactly to use stat() to capture information about a file. What I need is to be able to print several fields of information about a file. So.. [CODE] #include <iostream> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> using namespace std; int … |
|
Hi is there any difference between the size of a struct type and the size of it's instance? similarly with enum type and it's instance... |
The End.