49,761 Topics

Member Avatar for
Member Avatar for kartik14

Hi, I want to use a function from a different file in the main method of another file. Both the files are in the same visual studio project. I used the extern "C" keyword in the foreward declaration of this external function in the file containing the main method but …

Member Avatar for vijayan121
0
142
Member Avatar for crash override

I'm creating a program that connects to an IP address on a specific port, then uses the recv() function to return the data from the address. I don't know how to go about creating the buffer the data will save to. At first I was just going to create a …

Member Avatar for crash override
0
197
Member Avatar for WesFox13

Hey all, I need a bit of help starting on a homework assignment. I'm not asking for you to do it for me, I just need a little help getting started on it. Here is the site with information about the assignment: [URL="http://scidiv.bcc.ctc.edu/fl/cs210/Program4-S08.html"]http://scidiv.bcc.ctc.edu/fl/cs210/Program4-S08.html[/URL] I really need just a little bit …

Member Avatar for Alex Edwards
0
100
Member Avatar for Jboy05

How do I reverse the numbers in my program to produce the orginal numbers and the numbers in reverse? int magic_box (int N) { int digit1, digit2, digit3; digit1 = N / 100; digit2 = N % 100 /10; digit3 = N % 10; return digit1 + digit2 * 10 …

Member Avatar for tesuji
0
266
Member Avatar for bookworm619

What am I suppose to add here to buffer the weird sequence of numbers and letters? [code] /*------------------------------------------------------------------ * Assignment 4: Breaking the Code. Nested loops, command-line arguments.. *Worth: 50 points. 60 points if you write a "general purpose" program which can process ANY of the "document??.cry" files from the …

Member Avatar for Radical Edward
0
141
Member Avatar for Jennifer84

In a dataGridView1, you can Edit for example 5 Columns but before the First Column there is one column that has a star(*) in fron of the first row. What I wonder here is if it is possible to take this column away. It is possible to 'drag' the column …

Member Avatar for Jennifer84
0
104
Member Avatar for Jennifer84

I wonder if it is possible to change the color on the headers on a dataGridView1. I have searched in the members and properties but are not sure if I can find anything. By default it seems that the headercolor is "Control". Ex: is it possible to change the color …

Member Avatar for Jennifer84
0
119
Member Avatar for wellibedamned

i'm having problems reading with scanf... i'm trying to input some coordinates enclosed in brackets but it kinda skips the input that way... is it forbidden to say scanf( "(%d,%d) (%d,%d) (%d,%d) (%d,%d)", x1, yo, x2, y2, x3, y3, x4, y4 );? i'm using yo instead of y1 cause cmath …

Member Avatar for wellibedamned
0
112
Member Avatar for zoner7

I currently have a program that writes Sudoku boards to files; however, I would like the program to be able to read the board already in the file, copy it and then add another board to the file. It follows, then, that if there were two boards in the file, …

Member Avatar for zoner7
0
99
Member Avatar for &rea

Hello, I am programming an image application with a GUI. I open a grayscale image like this: [code] String^ s = openFileDialog1->FileName; s = s->Substring(s->LastIndexOf('\') + 1, (s->Length - s->LastIndexOf('\')) - 1); InputImageFileName = s; bmpInputImage = gcnew System::Drawing::Bitmap(openFileDialog1->FileName); [/code] then I create a new image [code] binaryImage=gcnew System::Drawing::Bitmap(bmpInputImage); [/code] …

Member Avatar for &rea
0
1K
Member Avatar for faust_g

Dreading memory leaks, I would like to make sure I have an understanding of the following code: [code=CPP] //vector initialized to allocate 10 string objects vector<string> *pvec1 = new vector<string>(10); delete pvec1; //10 vector<string> objects vector<string> *pvec2 = new vector<string>[10]; pvec2[0].push_back("test1"); delete [] pvec2; [/code] 1> Would executing the preceding …

Member Avatar for Radical Edward
0
143
Member Avatar for computers08

I need to make a handman game I have code but it won't show all the gesses at once and it won't end even if you get it right. PLEASE HELP This is what I have [code] #include <iostream> using namespace std; int main() { char solution[20]; //holds solution char …

Member Avatar for Salem
0
292
Member Avatar for zoner7

So I have a multi-dimensional array, and I want to pass a reference of it to another function so that the array is defined in the scope of the function, because the array is not a global variable. If I can remember correctly, the syntax looks a little like this: …

Member Avatar for Ancient Dragon
0
121
Member Avatar for ambarisha.kn

i am getting error in following program. what is "iota". Why it is giving an error in the following program [CODE] #include<iostream> #include<vector> #include<algorithm> using namespace std; int main() { vector<int> V(10); iota(V.begin(), V.end(), 7); copy(V.begin(), V.end(), ostream_iterator<int>(cout, " ")); cout << endl; cin.get(); } [/CODE]

Member Avatar for Radical Edward
0
1K
Member Avatar for herrepeder

Hi, I am using Visual Studio 2008 with .NET, on Windows XP. Does anyone know how to (in C++): *Recieve a trigger signal(1bit) from an external device, ie throught a generic microphone input(jack). * Play/stream a 1D table of raw data(double/long) as an audible sound throught the sound card. Assume …

Member Avatar for herrepeder
0
253
Member Avatar for slacke

Hello. I am working on a code where I need to simulate a character string on the serial port com1. (/dev/ttyS0). I have a WinCom aplication which helps me to read the output from an Enigma receiver. This receiver sends out signal strings like this: 5012 444418E13001000<DC4> // signal @ …

Member Avatar for Nick Evan
0
192
Member Avatar for ambarisha.kn

I want to run the following code. Its giving error as "Fatal Error" not able to open 'print.hpp' . No such file or directory.. I didn't understand what is #include "print.hpp". what type of file it is. shall we have to write this header file before executing the program. [code] …

Member Avatar for ambarisha.kn
0
225
Member Avatar for Egypt9

This is a very beta peice of code in a function I am working on that will write records to a file (casted as character data). I'm using an overloaded operator to set values in a class called Account. My teacher insists that I use the account as a way …

Member Avatar for Ancient Dragon
0
180
Member Avatar for rharvison

Hi, all. I am very new to C++ and am close to losing my mind with the homework. We are asked to generate a multiplication table using a 'for statement'. User is to input a number between 1-12; the program will generate a multiplication table and should loop for no …

Member Avatar for Alex Edwards
0
151
Member Avatar for slacke

I need to write a small program which collects (20-36 string) data from several com (serial ports) and sends them out on one. For example com2,3,4 to com1. It should be on Windows Xp workstation. (It is possible that I will do it later on linux, it seems to me …

Member Avatar for Ancient Dragon
0
345
Member Avatar for xnimrod

hi, i want to write a program in c++ or c# that will show me all the threads and their priority that now running in my application. how can i do this??? thanks, shay.

Member Avatar for Ancient Dragon
0
28
Member Avatar for prushik

I have written a few games in C++ with OpenGL, and I am working on another one now, its my biggest project. Everything works really great on my computer, but whenever I move my executable to another computer, the depth testing completely stops working. I have no idea what causes …

Member Avatar for jephthah
0
128
Member Avatar for Gagless

I was trying to see if my code for copying an array worked when I got this scary looking error message: Debug Assertion failed! Program: ...dio 2008\Projects\Test_Prep\Test_prep.exe File: f:\dd\vctools\crt_bld\self_x86\srt\dbgdel.cpp Line: 52 Expression _BLOCK_TYPE_IS_VALID(pHead->nBlockUse) Here's my testing code and the function I wrote: [CODE]int main() { const int MAX_SIZE = 5; …

Member Avatar for faust_g
0
129
Member Avatar for herms14

guys...could I ask for your help, I was given a programming assignment but I cant seem to understand the problem heres the problem: [B]write a program that creates an array of 100 random integers in the range from 1 to 200 and, then use a sequential search to search the …

Member Avatar for n1337
0
104
Member Avatar for webwareshop

Hello All, I have a chat friend online who said to me that if I don't know java or .Net then my web design will not make me money. I know how to program in php, asp html etc and willing to learn more as knowledge has no age limit. …

Member Avatar for sDJh
0
124
Member Avatar for William Hemsworth

Hi I have a small question, probably quite obvious but I cant seem to figure it out. When using the ifstream or any other stream you can tell if it was sucessfull in its last event. For example: [CODE=CPP] #include<fstream> int main() { ifstream in("test.txt", ios::in); if (in) { } …

Member Avatar for William Hemsworth
0
108
Member Avatar for VernonDozier

I was debugging some code yesterday and, after about fifteen minutes, found the culprit. This was in the code: [code] if (a = b) { // code } [/code] instead of this: [code] if (a == b) { // code } [/code] A very common mistake, but an aggravating one. …

Member Avatar for fierykido
0
1K
Member Avatar for zoner7

I basically need a function that, after a certain amount of time has elapsed, will restart a program from scratch. This is because the code can get stuck at a certain point if wrong decisions are made. I am curious how to go about making this. I am sure it …

Member Avatar for Ancient Dragon
0
118
Member Avatar for Jennifer84

I wonder if there is a good way to substring this string: [code] std::string OneString = "1,2,3,4,5,6,7,8,9"; [/code] so the substring will look like this: [B]1,2,3,4,5,6[/B] So what I am trying to do or wonder is, if there is a good way to substring from the end and 3 Commas …

Member Avatar for Jennifer84
0
288
Member Avatar for Agni

Hi, We're using curses library functions to draw windows in our project. For showing an error the error message is enclosed within '-'s , it seems to be working fine till we ported to a new linux machine where its displaying some garbage instead of the '-' . To be …

Member Avatar for Duoas
0
112

The End.