I program unix sokcet programming , and part of my code is ti open file from server and open it , but i surprised with this wierd error i dont have any reason for it ?
do { printf("Edit the entry's cellphone number:"); scanf("%s", addressbook[4][num]); length = strlen(addressbook[4][num]); //gets the length of the input (should be 10) //checks if the input is composed of 11 elements wherein the first 2 are 0 and 9 respectively for(i=0; i<11; i++){
I am writing a simple program to suck in a txt file then pump it into sql.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; using System.Data.OleDb; using System.Data.SqlClient;
[Code] ......
How I can get past this error and get the data into sql? I read a couple articles on .tag but not sure I understand what to do.
Define a class for a type called CounterType. An object of this type is used to count things, so it records a count that is a non-negative whole number.
Include a mutator function that sets the counter to a count given as an argument. Include member functions to increase the count by one and to decrease the count by one. Be sure that no member function allows the value of the counter to become negative.Also, include a member function that returns the current count value and one that outputs the count. Embed your class definition in a test program and run sufficient tests to verify it all works correctly.
I just compiled some code I've been working on at a different OS/compiler and realised that Code: sizeof(unsigned long) returns 4 in one pc and 8 in another.
I've heard that bytesize conventions for basic variables were not particularly "universal" before but this is the 1st time I've had a problem with it.
how do I make a typedef that clearly indicates to whatever compiler compiler I want u32 to be an 32bits unsigned and u64 to be 64bits?
How can I define type MARKS which will be able to hold 4 elements just like array? I want to access it just like normal array elements using brackets []. In the following struct I want to use such type.
Purpose of the struct ARGUMENTS is to hold 4 pointers to string. I want to mark few positions in string so I can simple access them. E.g. name=John
Code: arguments[0][0]=0; // begin of the param name arguments[0][1]=3; // end of the param name arguments[0][2]=5; // begin of the value arguments[0][3]=8; // end of the value I mean not to save int but the pointer to the corresponding position.
Define a class for a type called CounterType. An object of this type is used to count things, so it records a count that is a non-negative whole number.
Include a mutator function that sets the counter to a count given as an argument. Include member functions to increase the count by one and to decrease the count by one.
Be sure that no member function allows the value of the counter to become negative.
Also, include a member function that returns the current count value and one that outputs the count. Embed your class definition in a test program and run sufficient tests to verify it all works correctly.
I have looked into this and I've also read that I should be able to Config Each column Accordingly.
I'm Currently using this piece of code:
//Change the Headers on the DataGridView2// dataGridView2.Columns["cashQTY"].HeaderText = "QTY"; dataGridView2.Columns["cashDescription"].HeaderText = "DESCRIPTION"; dataGridView2.Columns["cashSupplier"].HeaderText = "SUPPLIER";
[Code] ....
Currently it does not error, but it also does not Show the DateTime in the GridView when running either..
struct Wine { string wineName; int vintage; int rating; double price; };
how can i store the file data below in an array with the structure type???
Dow Vintage Port ;2011;99;82 Mollydooker Shiraz Carnival of Love ;2012;95;75 Prats & Symington Douro Chryseia ;2011;97;55 Quinta do Vale Meão Douro ;2011;97;76 Leeuwin Chardonnay River Art Series ;2011;96;89
I'm trying to read information from a file and put the data into vectors of its appropriate type. For example: the file will have an int ID, string firstname, string lastname, double salary, int hours_per_week, and string work_position. All this data is separated by ";". I don't know how to read this file into the appropriate vectors: vector<int> ID, vector<string> fname, vector<string> lname, vector<double> salary, vector<int> hpw, vector<string> work.
say I have an xml-file. Now what my program does depends on the "element". Is it possible for xml schemas to define the action that the program should do? Ie is the following possible:
And then when xerces' parser reads elements of name "test" it also stores the action & that this element is "hidden". If this is impossible with xerces, is it possible at all with XML parsers?
For example, in a header file A.h, I define an abstract class,
Code:
// A.h class A { public: virtual void foo() = 0; private: static int _x; };
How'd I initialize static member data _x?Normally, we initialize a static member data in a cpp file. However, there is not cpp file for A.h. If I intialize _x in header file, there will be linker errors like mulitple defined symbols. What is appropriate way to do that?
I have a working lab project with a loop error. Code posted in second post. Here's the requirements:
* - program has to be able to handle file failure - must loop (prefer to use a while loop here), read in the data, calculates values, etc. and then output the results.
* The input data file includes
1. a 1 or a 0 indicating that there is a set of employee data following
2. the hourly rate of the employee
3. the humber of hours worked
4. the number of dependents
5. a 1 or a 0 indicating whether the employee is full time (1=full time).
Problem: At first I wouldn't loop back... so I moved the curly brace above the return0;
Is it possible to define and write your own file extension. if so is it an easy process or a complex waste of time. All I want to do is define a source file for a programming language I write.
My problem is to count the characters in a file and define how many times each one occurs.Characters who are not found must not be included in the table; The output must be a table - like that -
”| character | ASCII- DEC | ASCI – HEX | how many times it occurs |”
This my function:
Code: int f2(FILE *p1) { FILE *g3; int char_count[256]={0}; char ch; int n=0; if(!(g3=fopen("D:zz.txt", "w"))){
[Code] ....
It must look like this: | D | 68 | 44 | 2 | | 2 | 50 | 32 | 1 | and so on...
I have a Polymorphic class and some child classes, of which I need to make multiple instances of, using a list container. I've set the key type to be a unique pointer of the polymorphic class, and the values of each element pointing to a New Child instance, like so:
The only problem is that when I try to push_back a new element, I get a compiler error, saying "No instance of overloaded function".Should I try and create a pointer object on it's own and push back that object as an element, it will work fine:
I am getting the error on the implementation of my class name. The error is coming from my parkingControl.cpp 'ParkingControl parkingControlMenu;'. I have used this implementation fine before, but once I added a new main it stopped working. Below is my code.
I am trying to write a program that reads in an XML file, parses it and prints out information about each tag. I am getting the following errors when trying to build the program:
Parser.cpp:24:1: error: 'Parser' does not name a type Parser::getXMLData() { ^ Parser.cpp:120:1: error: 'Parser' does not name a type Parser:rocessXMLData(