SEARCH YOUR SOLUTION HERE  

The system can't find the file specified - Dev-Cpp

Is this a new difficulty or has it never been able to compile
I'll assume that this is a new install and it has never been able to compile before.
do you've a G++.exe inside the bin directory of ur devC++
You might need to consider reinstalling.
The Dev C++ can be got from this link.
http: www.bloodshed...dev devcpp.html
Make sure you obtain the set up "with MingW and libraries"
that is the version that comes with the compiler. otherwise all you've is the editor and can't compile.
Posted On: Thursday, January 3, 2013 Total Views: 3
View Complete with Replies




Related Messages:

Commenting your code snippet snippet   (6 Views)

Quote:

Originally Placed by grumpyI generally seek to write code snippet in a manner that avoids unnecessary comments. For instance picking names of variables functions types well can mean the code itself is its own documentation; comments are then less necessary.I do the exact same thing
View Replies !
Wana some help again   (3 Views)
I made a topic some 2 weeks ago about a program i have to do and since then i tried difficult using all the assist i got and I'm about to finish up my Program.
My program needs to find 2 files with same name and possibly same size creation date.The user should provide the path for the deed directory and the program should solve the rest.
Now as i told I'm about to finish itsince I've found solution to make the program proccess not only the desired folder but the subfolders also using recursion.Only The trouble is that I'm stuck a little bit at the end,Here's the code snippet
I've written so far.
Syntax (Toggle Plain Text) #include
#include
#include
#include
#include
using namespace std;
void Prebaruvanje(char *path)
{
WIN32_FIND_DATA data; Win32 data structure
HANDLE hFind; the handle that is returned with the FindFirstFile func
BOOL bContinue = TRUE;
char NewDirPath[MAX_PATH]; array that will store the new path
char cst[3]=" ";
_chdir(path); set the current directory to the path variable
hFind = FindFirstFile("*.*", &data);
while (hFind && bContinue) { while there is nothing left
if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { directory check
if ( (strcmp(data.cFileName, ".") == 0) &&
(strcmp(data.cFileName, "..") == 0)) { checking if the data.cFileName is a folder
cout< }else if It's make the new path the old path+ +the name of the folder we just found
NewDirPath=path+cst+data.cFileName; the place where I'm stuck at
Prebaruvanje(szNewDirPath); recursion
}
bContinue = FindNextFile(hFind, &data);
}
FindClose(hFind);
}
int main()
{
char path[50];
cout<cin.getline(path,50);
char *pathp=path;
Prebaruvanje(pathp);
system("PAUSE");
return 0;
}
#include
#include
#include
#include
#include
using namespace std;
void Prebaruvanje(char *path)
{
WIN32_FIND_DATA data; Win32 data structure
HANDLE hFind; the handle that is returned with the FindFirstFile func
BOOL bContinue = TRUE;
char NewDirPath[MAX_PATH]; array that will store the new path
char cst[3]=" ";

_chdir(path); set the current directory to the path variable
hFind = FindFirstFile("*.*", &data); while (hFind && bContinue) { while there is nothing left
if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { directory check

if ( (strcmp(data.cFileName, ".") == 0) &&
(strcmp(data.cFileName, "..") == 0)) { checking if the data.cFileName is a folder

cout< print the name of the file
}else if It's make the new path the old path+ +the name of the folder we just found
NewDirPath=path+cst+data.cFileName; the place where I'm stuck at
Prebaruvanje(szNewDirPath); recursion

}
bContinue = FindNextFile(hFind, &data);



}

FindClose(hFind);
}

int main()
{
char path[50];
cout<<"Enter the path of the directory"<cin.getline(path,50);
char *pathp=path;

Prebaruvanje(pathp);


system("PAUSE");
return 0;
}
View Replies !
Pointer Trouble   (11 Views)
well first of i did mean parameters in the WinExec() function..
second, I have altered my code snippet to set asid memory (at least that's what I guess I have done )
(Toggle Plain Text) #include
#include
#include
int main(void)
{
int bufsize=256;
char *buffer=malloc(bufsize);
while(1)
{
printf(" nCommand:>");
WinExec(buffer,SW_Display);
scanf(" s",buffer);
}
return 0;
} #include
#include
#include
int main(void)
{
int bufsize=256;
char *buffer=malloc(bufsize);
while(1)
{
printf(" nCommand:>");
WinExec(buffer,SW_Display);
scanf(" s",buffer);
}
return 0;
}
View Replies !
c++ string ... engrossing...   (5 Views)

Quote:

Originally Placed by DaWeiJust make ur question clear. Here is ur original one:
U got an answer right Then u got all excited, and after jabbering around like a pregnant woman in her first labor, decided u had another one: Then u got an answer to that, right We can not assist it if u do not know how can i ask a question. Go read the "How can i Ask a Question" thread, and follow that link in the Rules FAQ to "How can i ask questions the smart way." Meanwhile, do not tell me where to post. No one is forcing me, there may be other members who wish to view the answer, we did not just come here to serve u. Go off and sit behind the barn and think a little bit after u read up on things.calm down bro ...
yes i changed my question ... i did not know i was supposed to stick to the same question in a thread ....
but... yeah i want to stop assuming ppl can read my mind u view
so now ... are u willing to tell me what is going on in the function item* Scanner::get() with c oh ...if not for me ... but Probably for other people who need to know the answer :p
View Replies !
Confusing For Loop   (1 Views)
Hello I am attempting to generate an incredibly confusing for loop, but I've no solution at all how can i go about it, I will define what it needs to do:
I have two values (x and y), I increment one value (lets say x) 100 times, so the for loop for(x=1; x
This is a confusing for loop that I have no solution how can i construct, so I was thinking if once of u could lend me a hand...
View Replies !
Best Programming Language to Use?   (2 Views)

Quote:

Originally Placed by pr0gm3rI do not think u miss out anything Klaree ^___^ I feel relieved
View Replies !
I can't use my usb printer to print any data   (8 Views)
Hi.. I've to discover how can i print "world " to a paper.. but examples that I found works with dialog box .. I've to make a dos Program.. pls assist me
thanx.
View Replies !
stringstream   (2 Views)
Sorry that was me being stupid i forgot to alter the input string back to "123" and I thought it had worked :
Ur right u can not pass goodbit into setstate(), instead alter the line to:
s.clear( stringstream::goodbit );
this will clear the state to goodbit, and I promise this time it woks
View Replies !
Will anyone be my teacher??   (5 Views)
I always find books to be improve than online tutorials
View Replies !
Simple Software kbhit() and beep   (2 Views)
I'm supposed to make a program that beeps everytime any key is pressed. I thought this would be simple with an if or Probably even a do while and kbhit() but I can not receive any output from this program and I can only receive this code snippet to compile in borland C++ builder 6 I tried it in dev ++ and it did not recognize the beep command. Any insight would be comprehended thanks in advance.
#include "windows.h"
#include
#include
#include
int main(){
if(kbhit())
{
Beep( 800 600 );
}
}
View Replies !
Keeping window on top   (1 Views)
everyone
I set the window as topmost with SetWindowPos and it works just fine. However on games although the window appears fine over the window of the game, when I click on it, my window gets the focus and the game minimizes.
Is there any way to keep it on top with out disturbing other windows
View Replies !
OS Detection   (1 Views)
Good point. I am officially an idiot. Screw that then - I will just use various files.
View Replies !
IIT ROORKEE & COGNIZANCE-2011(11-13th March)   (7 Views)
Insomnia is a 12 hour - overnight programming contest that will test u adeptness not only at handling gawky codes but also how fast and clearly can u analyse difficulties.
Cash prizes worth Rs.40,000 on stake.
Registration already started at: http: www.cognizance.org.in
First Round begins on 9:00 PM, 29th Jan 2011 at
http: www.insomnia.cognizance.org.in
View Replies !
Must Discover C++   (3 Views)
everyone I am posting this cause I am havign some doubts of what i should do next.
I started to discover c++ in the hope of programming my own video game someday. (something like doom)
So yeah, i decided to take baby steps. My first book was c++ for dummies, then i read sams teach yourself c++ in 21 days. Those 2 books made me a console programming expert I think. But now I am uncertain what to do next.
What book or web site will teach me how can i make a windows Program.
What book or web site will teach me how can i program in direct x
quick questions
Is direct x a programming language, or an extension to c++
Do all compilers support direct x
i use the visual c++ 2005 express edition compiler, and dev c++
I'd be very gratefull if u could advise a book or link that will teach me direct x(how to make my own halo) or that will teach me ro program a windows software(like my own microsoft word)
Thx in advance fellow programmers
View Replies !
How can I return a dynamically allocated multi-dimensional array?  (3 Views)
Ok so Here is an easy question, I hope at least. I've a difficulty, I've a multi-Dimensional array of integers, int array[20][20]. However, I want it so the user can explain various sizes. Thats the easy part. I've a function like so:
int *arrayAddress
int* setArray(int x, int y)
{
int tempArray[x][y];
for(int xIndex = 0; xIndex
The last comment speaks for itself. How would I go about using the element in the array [10][2], and how would i go about deleting the array so I can allocate a new one I know, this is maybe an easy question, but I do not know how I'd do it. Also, I do not need to use vectors, as ttend to be difficult to work with.
View Replies !
Trouble moving C source from mac to windows  (1 Views)
Okay guys I had my system working almost exactly how I wanted it on my mac, but as this is for a class and tuse windows systems, then it must be compatible with windows, so I have immigrated the source code snippet over to windows and I have moved from xCode on mac to Code Blocks on Windows, using the GNU compiler and all of a sudden I am now getting a ton of difficulties whilst executing my code. My searchForISBN function no longer works, my addBook function no longer shows the ISBN record that it has just generated. I am ready to tear my r out after footering around with it to receive it ideal on my mac and now it is gone all skee-wiff after immigrating.
Here's my code:#include
#include
#include struct bookType
{
char isbn[15];
char title[30];
char author[30];

};
void eatExtraInput()
{
int c;
while ((c = getchar()) = ' n');
}
***********************************************************************************************************************************************
* *
* searchByTitle function *
* ---------------------- *
* *
* This function is used to search the bin file for a book on record by the name of *
* the Author. *
* *
* *
***********************************************************************************************************************************************
void searchByTitle()
{
struct bookType book;
int i = 0;
char name[30];
printf("Enter a book Title to search: ");
fgets(name, 30, stdin);
FILE *BookFile = fopen("BookFile.bin", "rb+");
rewind(BookFile);
int counter = 1;
printf(" n*********************************************************************************************************");
printf(" n* Title | Author | ISBN *");
printf(" n*--------------------------------------------------*--------------------------------*-------------------*");
while(fread(&book, sizeof(struct bookType), 1, BookFile))
{
if(strcmp(book.title, name) == 0)
{

counter = strcmp(book.title, name);

if (book.title[strlen(book.title) - 1] == ' n')
{
book.title[strlen(book.title) - 1] = ' 0';
}

printf(" n* s", book.title);

if(strlen(book.title)
Really could use a hand from somebody,
View Replies !
the value of an argument passed to a function changing unwantedly?  (6 Views)

#include
typedef struct node
{
int data;
struct node * link;
}n;
void addatbeg(n *);
void show(n *);
n* first=NULL; [b][i]this is the problematic variable[ i][ b]
int main()
{
int ch;
printf(" u"first);
while(1)
{
printf(" n enter 0 to terminate else any other key");
scanf(" d",&ch);
if(ch==0)
break;
addatbeg(first);
}
}
void addatbeg(n* first)
{
int ele;
n *new;
printf("enter the element");
scanf(" d",&ele);
new=(n*)malloc(sizeof(n));
new->data=ele;
printf(" nddd u n",first);
if(first==NULL)
{
new->link=NULL;
}
else
new->link=first;
printf(" nnew= u n",new);
first=new;
printf(" n first= u n",first);
printf(" u",first);
printf(" n u",new->link);
printf(" n before function is called first= u",first); [b]prints an address[ b]
show(first);
}
void show(n* temp)
{
printf(" n inside function,first= u",first); PRINTS ZERO
while(1)
{
printf(" ne");
printf(" n d->",temp->data);
if(temp->link==NULL)
break;
temp=temp->link;
}
}

I'm attempting to implement a linked list with a function to ADD ELEMENTS AT THE BEGINNING.
I've used a variable,first that holds the first node of the linked list.
but when i pass it to the show function,its value becomes NULL with out doing anything. so what is the mistake
WHY IS THE VALUE OF THE VARIABLE first getting modified
This post has been updated by theju112: 01 September 2011 - 04:07 AM
View Replies !
What is C++ generally used for?  (1 Views)
everybody just a fast question that I am hoping some body can shed some light on.
I have Currently started learning C++ and I am enjoying it very much. I have been sitting admiring though, 'what can I actually use it for' and is it possible to develop web applications using it I know that generally PHP and Javascript are the standard web developing languages but I was thinking if it was possible to use C++. Also, how on earth do u generate GUI's I have no clue, all I have been able to do is generate introductory softwares on the console(which is mighty fun all the same).
Just seeking some advice from people who know their stuff.
View Replies !
array  (5 Views)
how to make a two dimentional array
View Replies !
2d Array Replace Value  (4 Views)
I've my program outputting a number grid that is nxn. I've it using a 2d array to output my grid but the problem I am having is that when the user wants to input a number that is in the nxn grid the value isn't being interchanged by either an x or and o. essentially its a big tic tac toe board that takes 5 to win and not 3. so allows say it was a 10x10 board, my program can output this
1 2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30
31 32 33 34 35 36 37 38 39 40
41 42 43 44 45 46 47 48 49 50
51 52 53 54 55 56 57 58 59 60
61 62 63 64 65 66 67 68 69 70
71 72 73 74 75 76 77 78 79 80
81 82 83 84 85 86 87 88 89 90
91 92 93 94 95 96 97 98 99 100
and now it requests the user for a number, allows say 74, but when tenter the number it does not interchange the letter 74 on the grid
My thinking is that I've to make another 2d array so that it stores the users input and then outputs the new grid but with the user's input as an x or an o over told number.(my code snippet thus far and i know it does not do much else other than output a grid,
View Replies !
Dynamic Memory allocation checking  (6 Views)
hi..
please tell me how can i check dynamical memory allocation has succeeded or not
Any assistance is extremely comprehended..
View Replies !
How do I open image files using C and GUI (glade 3) programming  (1 Views)
can anybody assist me make a C program code that will open an image file (JPEG for instance) I am using C language and GUI glade3 alongside it. to assist u visualize it i need to type the image filename in a text see entry and when i click a button (Load for instance) the image will be opened and seen in the image widget of Glade. the program code and the image file are located in the same folder. any kind of advice and assist will be extremely comprehended.
View Replies !
use of ntohl  (1 Views)
need assist to simplify readFourBytes function. write four bytes to a network byte array from a little endian machine
void writeFourBytes(unsigned char *desPtrunsigned long src)
{
unsigned long bigEndian = 0; output of input in big endian format
bigEndian = htonl(src);
write to datagram in network byte order using a pointer
The reinterpret_cast can't be avoided: want to convert
from one type to another type
*(reinterpret_cast(desPtr)) = bigEndian;
}
**
* readFourBytes
*
* This method is used on little endian machine to Reading big endian 4-Bytes
* to test the writeFourBytes function
unsigned long readFourBytes(unsigned char *srcPtr)
{
unsigned long des = 0;
unsigned long desTemp = 0;
desTemp = *srcPtr;
desTemp <
View Replies !
function overloading  (4 Views)
Error1error C2668: 'sqrt' : ambiguous call to overloaded function
View Replies !
Help with table for huffman encoding  (1 Views)
what I'm attempting to do is to generate a table for translating the alphabet to binary with huffman encoding. I made a table where i do that but it is a table A[20][20] i wana each line to have as several columns as needed.
Is it possible with C to generate a two-dimensional table A[i][j] and have each line to have it is own number of columns
for example
0 --> 1st line 1 column
01 --> 2nd line 2 columns
011 --> 3rd line 3 columns
0111 --> 4th line 4 columns
View Replies !
infix to postfix  (2 Views)
c++ code snippet to evaluate an infix expression in 1 pass with out converting to postfix first: using 2 stacks
View Replies !
Linking Trouble - Undefine Reference  (3 Views)
What is causing these "undefine reference" bugs
View Replies !
c language  (2 Views)

int main( )
{
int r c, num=1 ,len;
clrscr( );
printf("Enter the required no. of rows:");
scanf(" d", &len);
for( r=1; r
View Replies !
error LNK2005: _DllMain@12 already defined in dllmain.obj  (2 Views)
again
I tried looking for a solution, via google looking for solving the error message but the ones at MSDN did not work for me
I don't know why it does not work and why It's wrong Here's the source
nRecoil.cpp : Defines the exported functions for the DLL software.

#include "stdafx.h"
#include
HANDLE CallOfDuty4 = GetCurrentProcess();
BYTE NoRecoil[] = {0xEB,0x12};
BOOL WINAPI DllMain (HINSTANCE hModule, DWORD dwAttached, LPVOID lpvReserved)
{
if (dwAttached == DLL_PROCESS_ATTACH)
{
WriteProcessMemory(CallOfDuty4, (void*)0x00457CCF, &NoRecoil, 0x2, NULL);
}
return 1;
}

this is what i receive1>------ Build started: Project: nRecoil, Configuration: Debug Win32 ------
1>Build started 6-12-2009 1:44:01.
1>_PrepareForBuild:
1> Touching "Debug nRecoil.unsuccessfulbuild".
1>ClCompile:
1> stdafx.cpp
1> nRecoil.cpp
1> All outputs are up-to-date.
1>ManifestResourceCompile:
1> All outputs are up-to-date.
1>nRecoil.obj : error LNK2005: _DllMain@12 already defined in dllmain.obj
1>LINK : error LNK2001: unresolved external symbol _Dllmain
1>c: users tristan documents visual studio 2010 Projects nRecoil Debug nRecoil.dll : fatal error LNK1120: 1 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:02.53
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
tried looking what is wrong.. i can not find it
http: dl.dropbox.co...2051025 DLL.jpg]image of the C++[ url]
is it some thing in my config or in the code snippet or
please point me to the the difficulty
View Replies !
Help fixing "error: expected `;' before ..."  (1 Views)
silly question but I can not find why I'm getting the error message. Where would I be missing a semi-colon.
the line that is displaying the error is the so last one. Thanks in advance to anyone who can assist me.
{
cin >> confirmAccountNumber;
cin >> transactionType;
cin >> transactionAmount;
purchase = 0;
payment = 0;
if (confirmAccountNumber == -1)
{
if (transactionType == 'X')
if (transactionAmount == -1)
terminateProcess = 1;
}
else
terminateProcess = 0;
if (terminateProcess =1)
{
if (confirmAccountNumber = accountNumber)
{
cout <
View Replies !
scientists and their data   (2 Views)
ok so I am still working on that code snippet from before.
The structs helped
I figured out how can i deal with that function call I was unfamiliar with
I got a sample set of Data to work with
It at least looks like it is displaying... sometimes
but it rotates and translates SUPER slow
because the scientists insist of having me draw tons of polygons to show an image
Here's a sample of the data their providing me:
triangles: 325252
min:{59.254856 -155.801804, 59.254856}
max:{419.745148, 428.643616, 729.000000}
{225.000000, 0.000000, 59.916370} {224.123322, 0.000000, 60.000000} {225.000000, 0.000000, 60.000000}
{225.000000, 0.000000, 59.916370} {226.000000, 0.000000, 60.000000} {226.000000, 0.000000, 59.827518}
{225.000000, 0.065617, 284.000000} {226.000000, 0.065617, 60.000000} {225.000000, 0.065617, 59.916370}
{226.000000, 0.000000, 59.827518} {227.000000, 0.000000, 60.000000} {227.000000, 0.000000, 59.745190}
{226.000000, 0.135573, 285.000000} {227.000000, 0.135573, 60.000000} {226.000000, 0.135573, 59.827518}
{227.000000, 0.000000, 59.745190} {228.000000, 0.000000, 60.000000} {228.000000, 0.000000, 59.669350}
{227.000000, 0.200616, 286.000000} {228.000000, 0.200616, 60.000000} {227.000000, 0.200616, 59.745190}
{228.000000, 0.000000, 59.669350} {229.000000, 0.000000, 60.000000} {229.000000, 0.000000, 59.599957}
{228.000000, 0.260719, 287.000000} {229.000000, 0.260719, 60.000000} {228.000000, 0.260719, 59.669350}
{229.000000, 0.000000, 59.599957} {230.000000, 0.000000, 60.000000} {230.000000, 0.000000, 59.536980}
{229.000000, 0.315874, 288.000000} {230.000000, 0.315874, 60.000000} {229.000000, 0.315874, 59.599957}
{230.000000, 0.000000, 59.536980} {231.000000, 0.000000, 60.000000} {231.000000, 0.000000, 59.480392}
{230.000000, 0.366061, 289.000000} {231.000000, 0.366061, 60.000000} {230.000000, 0.366061, 59.536980}just so you've a range that I am working with...
here's the code specifically related to how I am drawing the Objects as It's...
for (place2BeC=0;place2BeC
now I suppose if I can find a way to work the cross products out of that part (so I do not have to repeat it every time) that'll speed every thing up a little bit, but other than reducing the number of triangles (which I am attempting to receive those durn scientists to do) is there anything else that I could do to perhaps decrease the processing strain this puts on the poor computer attempting to show this
View Replies !
Basic question on IF structure  (1 Views)
Hello I'm used to VB and just getting associated with C++
If I've more than one condition to validate before doing an action, How can I do that do I just put the IF one after one like this
if (condition1)
if (condition2)
if (condition3)
{
statement;
}
I have researched in eBooks but somehow I can't receive it working
View Replies !
How do I save win32 stuff  (1 Views)

#include
LRESULT CALLBACK WndProc(HWND UINT, WPARAM, LPARAM);
HWND hMsgBoxBTN;
HWND hEdit;
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR szCmdLine, int nShowCmd)
{
static char name[] = "My Software";
WNDCLASSEX wc;
HWND hwnd;
MSG Msg;
Step 1: Registering the Window Class
wc.cbSize = sizeof(WNDCLASSEX);
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_Software);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH) (COLOR_WINDOW+3);
wc.lpszMenuName = NULL;
wc.lpszClassName = name;
wc.hIconSm = LoadIcon(NULL, IDI_information);
if( RegisterClassEx(&wc))
{
MessageBox(NULL, "Window Registration Failed ", "Registration Failure",
MB_ICONEXCLAMATION | MB_OK);
return 0;
}
Step 2: Generating the Window
hwnd = CreateWindowEx(
WS_EX_clientEDGE,
name,
"Notes",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT, 800, 600,
NULL, NULL, hInstance, NULL);
ShowWindow(hwnd, nShowCmd);
UpdateWindow(hwnd);
Step 3: The Message Loop
while(GetMessage(&Msg, NULL, 0, 0) > 0)
{
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
return (int)Msg.wParam;
}
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
HDC hdc;
PAINTSTRUCT ps;
RECT rect;
switch(msg)
{
case WM_Generate:
hEdit = CreateWindowEx(WS_EX_WINDOWEDGE, "Update", "", WS_CHILD | WS_VISIBLE|
ES_MULTILINE | WS_HSCROLL | WS_VSCROLL | ES_AUTOHSCROLL | ES_AUTOVSCROLL,
0, 0, 0, 0, hwnd, NULL, GetModuleHandle(NULL), NULL);
break;
case WM_SIZE:
ReceiveclientRect(hwnd, &rect);
SetWindowPos(hEdit, NULL, 0, 0, rect.right, rect.bottom, SWP_NOZORDER);
break;
case WM_PAINT:
hdc = BeginPaint(hwnd, &ps);
EndPaint(hwnd, &ps);
break;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case BN_CLICKED:
if(hMsgBoxBTN == (HWND)lParam)
{
int len = GetWindowTextLength(hEdit);
char *buff = (char*)GlobalAlloc(GPTR, len+1);
GetWindowText(hEdit, buff, len+1);
GlobalFree((HANDLE)buff);
}
}
break;
}
return DefWindowProc(hwnd, msg, wParam, lParam);
}
this is what I've so far it opens a so easy notepad replica minus all the functions aka menu bar any solutions on how can i add a save function
i know how can i use rc files i just don't know the function for saving any advice would be well comprehended.
This post has been updated by Masterchief117.arbiter: 16 June 2009 - 08:48 AM
View Replies !
C Structure with Money Conversion  (8 Views)
Here are the instructions for my difficulty:
Write a program to
add two dollarsQuartersDimes monies and store the result in the third dollarsQuartersDimes monies. Remember to make necessary dime and nickels to quarters and quarters to dollar conversions.
Note: 10 dimes = 1 dollar and 4 quarters = 1 dollar.
Here is what I've so far:#include
struct dollarsQuartersDimes
{
int OneDollar;
int quarters;
int dimes;
int nickels;


};
int main(void) {
struct monies;
monies.dollars = 16;
monies.quarters = 5;
monies.dimes = 01;
while ()
{
}
printf("The third Monies contains d One Dollar bills t d Ten Dollar bills t d quarters t d dimes " monies.OneDollar, );
}I do not know what to do with the while loop and conversions necessary to complete.
View Replies !
Problems with Error Loop  (2 Views)
My Menu does not seem to do what it should do. Whenever I deliberately enter a Character instead of a number instead of looping back to the main menu and letting me enter the correct choice, it freezes and I've to restart the software
Here is the code snippet #include
#include
void menu (void);
void add_book (void);
void list_books (void);
void search_ISBN (void);
void search_title (void);int main(int argc, char *argv[])
{
menu();
system("PAUSE");
return 0;
}
* Menu function *
void menu ()
{
int choice=0;
while (choice =5) * start loop to do this until user wishes to quit*
{ system ("cls");
*Display Menu Choices *
printf("****************************************************** n");
printf("* MENU * n");
printf("** n");
printf("* 1 Add a book to file * n");
printf("* 2 List of all books on file* n");
printf("* 3 Search for a book using an ISBN number * n");
printf("* 4 Search for a book using the title* n");
printf("* 5 Quit * n");
printf("** n");
printf("****************************************************** n");
printf("** n");
printf("* Please enter ur choice 1 -5* n");
printf("** n");
printf("****************************************************** n");
scanf (" i", &choice);

*Start Switch to take user to correct option from menu*
switch (choice){
case 1: add_book();
break;
case 2: list_books();
break;
case 3: search_ISBN();
break;
case 4: search_title();
break;
case 5: printf("EXIT");
break;
default: printf("You've made an incorrect choice");
printf("please enter a choice from the menu 1 to 5");
system ("pause");
break;
}
}
}
void add_book (void)
{
system ("cls");
printf ("This will add a book");
system("PAUSE");
}
void list_books (void)
{
system ("cls");
printf ("This will list the books");
system("PAUSE");
}

void search_ISBN (void)
{
system ("cls");
printf ("This will search for ISBN");
system("PAUSE");
}
void search_title (void)
{
system ("cls");
printf ("This will search for title");
system("PAUSE");
}
View Replies !
direct hashing method  (2 Views)

make this code snippet Pls...
View Replies !
How do I use complex numbers in c++ in vs 2008  (1 Views)
Can not find in VS 2008
View Replies !
Explination of int return type and void return type  (4 Views)
I have to provide a situation where a function would have an int return type and another situation where a function would have a void return type.
Can somebody pls define what these two mean and I can come up with an example on my own
View Replies !
what internally happened when a prgm is compiled  (1 Views)
when source prgm is compiled three files are generated.
1.Backup file
2.Obj file
3.exe file
what is happening internally when a prgm is compiledhow and when all these files are generated
View Replies !
help computing average  (3 Views)
I'm newbie to c programming. I've written a program to receive data from a file count each number, then take the average adn find the max and min. I've most of if, but I'm having many bugs. there are 30 sets of numbers in the file, yet when i execute the program it says there are 31. my average is also about .5 off. i thought that it would be off because the total number of numbers should be 30 not 31, but even using 31 It's still off. i hope I'm being clear. if anybody could provide me any hints or ideas i'd reaaally applaud it. I've beeen working on this for a so long time and i just can not seem to find out what I'm doing wrong...Here's my code snippet
#include
#include
int main()
{
char inFileName[160];
int x;
int tempcount = 0;
int max = 0;
int min = 10000;
double sum = 0;
FILE *tempsIn;

printf("Temperature Analyzer v1.1 n");
printf(" n");
printf("What file to analyze n");
scanf(" s",&inFileName);

tempsIn = fopen("c: documents and settings christina kestler desktop temps.txt", "r");
if (inFileName == NULL) {
printf("File could not be opened. n");
system("pause");
EXIT(EXIT_FAILURE);
}

while( feof(tempsIn))
{
fscanf(tempsIn," d",&x);
tempcount++;
sum += x;
if(x > max)
max = x;
if(x
View Replies !
Robotics Programming  (2 Views)
This is my second year on my school's FIRST robotics team and I am still a novice when it comes to robotics programming. The language used by FIRST this year is C++, and tprovide a framework, so I would not be programming the robot from scratch. I'm proficient in Java, but I focus on informatics programming not robotics. Would anybody be willing to tutor me on robotics programming with C++ via forum If not, does anybody have a good online resource
View Replies !
problems with win API  (1 Views)
am newbie to this forum and i hope I will find answers to my questions here.. hope am posting this in the right place..
I'm newbie to programming with windows api in c++ and I've started programming a traffic simulator, anyway things are going fine except for three things, hope some body can assist me with them..
1- How do I rotate a rectangle by a certain value in windows api
2- How do I generate a window with size of the full screen, and whose size can't be modified that is the "restore down" for It's disabled
3- finally, that is some thing so weird:
I'm using rectangles to represent cars and some regions are filled with certain colors, and more... am moving the cars using the timer, by changing the location of the rectangles each certain time (provided by the timer), but after time of executing the software, the colors of other regions in the window disappear, can anyone assist me solving this difficulty
View Replies !
Create array to Store System Data types  (2 Views)
[font=Courier New] ....
I'm using VC++ 2005 professional edition.
I want to make an array to store these data.. System::Data::SqlDbType int
System::Data::SqlDbType double
System::Data::SqlDbType float
so I generate a array
System::Data dt[]={ System::Data::SqlDbType int, System::Data::SqlDbType double,System::Data::SqlDbType float };
I am getting error message ' error C2882: 'Data' : illegal use of namespace identifier in expression'..
I do not know what data type to use in this array... Ur assist apprechiated..
View Replies !
do not know what is wrong  (3 Views)
this is my hw question: write a program to print the following on the screen.
*****
****
***
**
*
this is the program that i spell but when i execute it, it prints the opposite.
like this : *****
****
***
**
*
---------------------------
#include
using namespace std;
int main() {
int i;
for(i=1;i
Mod update - Added code snippet tags.
View Replies !
Entering a certain number to continue...  (3 Views)
Okay so I'm newbie (first post) and I'm used to Python and Pygame but neither of those will do what I want to do: Generate a text RPG Console Software.
I know how can i do the cin and cout and some other things with C++, but I do not understand how can i make it so that when u enter 1 it continues or if u enter 2 it EXITs.
So far I've:#include
using namespace std;
int main()
{
cout <
I've seen how u can enter a number and subtract or some thing like
#include
using namespace std;
int main()
{
int iNumber;
cout <
I just do not receive how u can make it where u can only enter 1 and continue... and I have not found a place that could assist. (until now)
Can somebody pls point me in the right direction to the right post or display me just the most introductory way of doing this.
View Replies !
Accept any number from the user. Display if the number is divisib  (2 Views)
#include
#include
main()
{
int ip=0,j;
for(i=1;i
for(j=1;j
{
if(i j==0)
p++;
}
if(p==2)
printf(" d",i);
p=0;
}
getch();
}Dear maam,
Sorry i hope my question wasn't full.
Pls check this again.
Ques: Accept any number from the user. Show if the number is divisible by 100 or not.
View Replies !
program Help on reversing and palindromes  (1 Views)


#include
#include
#include
#include
using namespace std;
bool nbr(char symb);
void revstring(string & s);
void print1(string s);
void print2(string s);
void print3(string s);
void print4(string s);
void print5(string s);
int main()
{
string s; original string
cout <= '0' && symb nbrstk;
int i=0;
while( i
View Replies !
Plane Tickets  (1 Views)
(Airline Reservations System) A small airline has just purchased a computer for its new automated reservations system. You've been asked to program the new system. You're to write a program to assign seats on each flight of the airline's only plane (capacity: 10 seats).
Ur program should show the following menu of alternatives -- pls type 1 for :First class" and pls type 2 for "Economy". If the person types 1 ur program should assign a seat in the first class secton (seats 1-5). If the person types 2, ur program should print a boarding pass indicating the person;s seat number and wheather It's in the first class or economy section of the plane.
use a one-dimensional array to represent the seating chart of the plane. Initialize all the elements of the array to 0 to indicate that all seats are empty. As each seat is assigned, set the corresponding elements of the array to 1 to indicate that the seat is no longer available.
Ur programshould, of course, never assign a seat that has already been assigned. When the first class section is full, ur program should ask the person if It's acceptable to be placed in the economy section (and vice versa). If yes, then make the appropriate seat assignment. If no, then print the message "Next flight leaves in 3 hours".
Ok, Now I guess I understand how this one works. The difficulty I'm having is the while loops... I've made it to where it understands if the seat is in 1st class or coach. It will let u know if a seat isn't on the plane, and if you've a person in the spot. The difficulty I'm having is How can I make these functions respond to entering 1 or 2
If you could assist me understand that a little improve that would be awesome. Andrew Young
7.20
#include
using namespace std;int main()
{
int num, i, j, c, _array[ 10 ]={0,0,0,0,0,0,0,0,0,0};
for( c=0; c> num;
while ( num>=1 && num=6 && num=1 && num
If you could let me know what I'm doing wrong I'd extremely applaud that.
-Andy Young
This post has been updated by AndrewYoung: 08 November 2007 - 06:34 PM
View Replies !
Wana help fixing warnings  (3 Views)
The Following program converts a decimal number to its binary equlivent. I'm having some compliing problem and sorry if this is not in the right format pls yell at me if i want to correct it.

#include int getinput(int);
int convertdec(int);
int main()
{
int decimal; Initializes decimal
int conversion; Initializes conversion

decimal = getinput(decimal);
conversion = convertdecimal(decimal);
return(0);
}int getinput(int decimal)
{
do
{
printf("Enter the decimal value to convert to binary: ");
scanf(" d", &decimal);
if(decimal 0)
{
remain = temp 2;
addUp = addUp + remain * pow(10, count);
temp = temp 2;
count++;
}
printf("The binary equivalent of d is d n", decimal, addUp);

return(addUp);
}When I complie on a gcc complier i receive the following bugs and do not know how can i resolve them.
main.c: In function 'main':
main.c:22: warning: implicit declaration of function 'convertdecimal'
main.c: In function 'convertdecimal':
main.c:58: warning: implicit declaration of function 'pow'
main.c:58: warning: incompatible implicit declaration of built-in function 'pow'(*edit - use the code snippet tags like this: )
This post has been updated by jjhaag: 05 November 2007 - 02:31 PM
View Replies !
Wana help in a Counter Software   (2 Views)
So fundamentally
I want to write a program that reads input from the keyboard up to EOF and reports back the following:
the number of words ( Was able to receive this to work decently)
the number of uppercase letters (Stuck)
the number of lowercase letters (Stuck)
the number of punctuation characters( Stuck)
the number of digit (Stuck)
This is what I've so far.
Could somebody pls point me in the right direction #include
#include
#include
#define TRUE1
#define FALSE0
int main(void)
{
Local Variables
char currentCharacter = ' 0';
int wordCount = 0;
int upperCount = 0;
int lowerCount = 0;
int punchCount = 0;
int digiCount = 0;
int inWord = FALSE;
Begin
receive input
printf("Type some words and I will tell u some stats n");
printf("Press Ctrl-Z (or Ctrl-D if on unix) to finish n n");
while( (currentCharacter=getchar()) = EOF )
{
Determine if we are starting, in, or finished a word
if( isalnum(currentCharacter) )
{
if( inWord ) Must be starting a new word
{
inWord = TRUE;
wordCount++;
}
}
else
{
if( inWord )
{
inWord = FALSE;
}
}
Increment appropriate char counter
if( isupper(currentCharacter) )
{
TODO: increment counter
}
else if( islower(currentCharacter) )
{
TODO: increment counter
}
else if( isdigit(currentCharacter) )
{
}
else if( ispunct(currentCharacter) )
{
TODO: increment counter
}
}
Show message that output file was generated
printf("The number of words are d. n", wordCount);
printf("The number of uppercase letters are d. n", upperCount);
printf("The number of lowercase letters are d. n", lowerCount);
printf("The number of punctuation characters,are d. n", punchCount);
printf(" The number of digits. d. n", digiCount);
printf(" n nprogram has successfully ended n");
These next lines pause the computer.
printf(" n nPress [ENTER] to EXIT the Program. n");
getchar();
} end function main

This post has been updated by guyaneser: 31 July 2008 - 11:39 AM
View Replies !