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.
I am trying to run this source code but i am getting the compiler error Expression Must Have a Constant Value. I tried making both the variables x and y constants and assigned them to a significantly big number but then i am getting the error expression must be a modifiable lvalue.I have made comments in the code in front where Visual Studio is giving me the syntax error (red squiggly line).
#include<iostream> #include <string> #include<cmath> using namespace std; int main(){ int x; int y;
working on this code I have encountered a few issues. My program lists the occurrence of each letter but i'm unsure of how to enable numeric variables. how to improve the overall quality of the code.
Code:
#include <stdio.h> #include <string.h> int main() { char string[100], ch; int c = 0, count[26] = {0}; printf("Enter a string
when I was looking for a way how to convert char into numeric value for std::cout I found some old discussion with this statement: Operations on unsigned int are typically faster than on unsigned char, because your processor cannot fetch single bytes but has to get at least a multiple of 4 and mask out the other 3 bytes. Is this true? By using smaller (in bytes) variable I actually slow down my program? I always thought that it is a good practice if I use the smallest variable which will do the work. Is it also dependent on a compiler and OS?
I want to avoid converting the char[] into a string as an intermediate step, since I'm trying to write some "string" parser helpers which don't allocate a bunch of different strings onto the heap. (whole point of this little project is to reduce GC pressure in applications that do alot of string parsing).
basically if I have a char[] that contains {'1','2','3'}, I'd want to to be converted into 123.
I tried messing around with the stackalloc operator in C#, but its illegal to stackalloc a string unfortunately. I also googled around for converting a char[] into a numeric value, but all the solutions convert each individual char into their ASCII code, or convert the char[] into a string as an intermediate step.
I'm trying to perform a simple input operation, and check to make sure that whatever the user input is a valid input (is within data type bounds, is correct data type...). But when I get to ignoring the input, I keep getting an error.
unsigned short num; while (true) { std::cin >> num; if (std::cin.fail()) { num = 1;
I have a button which selects a particular tab and tab page on a form. This tab page has an embedded tab control with several more pages.
When I click on this button, the desired tab page is selected, but the NumericUpDown value (which is on the tab page) is not visible. The value is the current year.
Could it be that somehow, the click event for the button is hiding the value?
Write a program that reads in the numeric representation of a date and prints it out in a formatted manner as the box below.
1. If the user entered an invalid number for the month it should display "Invalid Month" 2. If the user entered an invalid number for the date it should display "Invalid Date" 3. Check to see if the day is outside the range for that particular month
An example of the input and the output: Enter the date: 1 24 2013 The date you entered is: 1242013
Im not sure on how to go about this problem, but this is what I have.
#include <stdio.h> int main(void) { int a, b, c; int status; printf("Enter the Date"); status = scanf("%d,%d,%d",&a, &b, &c); printf(" The Date is : %d",status); return 0; }
Am I going about this right? Is there an easier or better way to go about it? All that happens is that the program reads the first number and spits that back out.
i m learning c programming and i m stuck with this program for some reason.Write a program that converts alphanumeric phone number into numeric form:
O/P: Enter phone number: CALLAT 2255288 here is the code i have written: /** compilers shows no error **/ and O/P I get is Enter phone number: CALLAT /**blank space***/
#include <iostream> class Hello { public: void Test() {
[Code].....
As i know a non-constant member function cant be called inside a constant member function but how the above code has been compiled successfully and giving the expected result .
In the code below. I believe I am returning the memory location of the value I am looking for. How can get the value?
main.cpp
int choice = 0; PlayerMenu *newPM = new PlayerMenu; File *file = new File; // Menu for loading, creating or exiting the game choice = newPM->menuChoices();
PlayerMenu.cpp
[Code] ....
I am not sure how to deference the value so I can get at the value instead of the memory location.
How can i get the Location of an Image used by the ToolStripButton? I need the locaton to detect if the cursor is above the image that i use for the button. I tried it like this:
Code: class SomeOtherClass; void foo(SomeOtherClass* p);
And
Code: void foo(class SomeOtherClass* p);
I was told that "2" would limit the scope of the forward declaration to the declaration of foo... However, after testing it, it appears that both behave the same...
I recently started learning C++ and wanted to deep a bit into process memory reading for Windows, but I get an error I don't know how to fix. I'm using Visual Studio Express 2013 as my IDE and it tells me this, when I try to run and debug:
"Unhandled exception at 0x77E3E243 (ntdll.dll) in readProcessMemory.exe: 0xC0000005: Access violation reading location 0x00000043."
The Call Stack window says following: ntdll.dll!_NtRaiseException@12() Unknown ntdll.dll!_KiUserExceptionDispatcher@8() Unknown ntdll.dll!_RtlInitUnicodeString@8() Unknown > readProcessMemory.exe!main() Line 8 C++ [External Code]
And in the Output window is this: First-chance exception at 0x77E3E243 (ntdll.dll) in readProcessMemory.exe: 0xC0000005: Access violation reading location 0x00000043. Unhandled exception at 0x77E3E243 (ntdll.dll) in readProcessMemory.exe: 0xC0000005: Access violation reading location 0x00000043.
My code should be extremely simple, I'm just trying to find a Windows window. But here's the code.
Code: #include <windows.h> #include <iostream> using namespace std; int main(){