|
Either you are not understanding what you are asking, or you are not understanding what you've been told. Using the Replace() method within a while() loop is not going to work in your situation.
Other than that, if it's still not working, you need to show the input string, the desired output string, and the output string that your code produces.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
IMO a looped replace may have a devastating effect, try
while(csTemp.Replace("a","ab"));
on a string that holds some 'a'.
|
|
|
|
|
I have a MFC C++ application that has a right-click context menu when it is minimized to the Taskbar. In Vista and Windows XP, all is well. Right click on the icon/application name in the task bar and there it is.
However, when run under Windows 7, all I get is the Windows 7 menu - Go to the Application, Pin it to the Taskbar or Close the Window.
If my application minimizes to the System Tray, then right-clicking on that icon in Windows XP, Vista and Windows 7 works OK and my application context menu appears.
Can anyone shed any light on this behaviour using the Taskbar and Windows 7?
Thx
|
|
|
|
|
Correction - on further testing - the thing I am missing when right-clicking on the icon on the Taskbar on Windows 7 is the System Control menu containing menu items: Restore, Move, Size, Minimize, Maximize and Close.
These are there for Windows XP and Vista - but Windows 7 only has Close.
Sorry for any confusion.
|
|
|
|
|
like mathematica
|
|
|
|
|
|
|
Nothing like Mathematica, but take a look at Boost[^] (scroll down to the "Math and numerics" part).
|
|
|
|
|
hello guys...im trying to compile two projects but getting this error along with the following
error C2146: Syntax error: missing ';' before identifier XXXXX in *.h
Now I have checked all the paths and (for *.h and *.lib files) they all look fine. Whats wrong??
|
|
|
|
|
If you showed the code in error, it would help a lot more. You probably forgot to include a header file, but it is difficult to judge without seeing the code.
|
|
|
|
|
a compiler that is any good would show an exact file name and line number, so you would know which line of code it is objecting to (and you could show it in your message).
And as others have said, a likely cause for this particular message is an include problem, some symbol not holding its intended definition.
BTW: you could get inspiration by entering a code-independent part of the message into google, try with missing ';' before identifier (see I omitted file name, variable names, etc as those would be specific to your exact situation).
|
|
|
|
|
There is nothing to hide from my code and I did this just to generalize the problem.
- When I build the Project2 only, it builds successfuly.
- But when I build this with Project1, it shows these errors.
Now when i go to see the errors, only variable are initialized. This means that there is nothing wrong with the code. thnx anyway.
|
|
|
|
|
The missing ";" is probably in the file that includes your "*.h", just before the #include, ot at he and of another include file that's include just before it.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
i had the same problem last week.
The problem is :
DEVICE_TYPE xxxx; missing ';' before identifier xxxxx
Header file that define DEVICE_TYPE is not included and when i include that file it works.
please check.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
pre>
<br />
<br />
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)<br />
{<br />
m_wndSplitter.CreateStatic(this, 1, 2);<br />
<br />
m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CLeftPanel), CSize(400, 400), pContext);<br />
m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CRightPanel), CSize(400, 400), pContext);<br />
m_wndSplitter.SetActivePane(0, 0);<br />
<br />
return TRUE;<br />
}<br />
#pragma once
class CLeftPanel : public CDialog
{
DECLARE_DYNCREATE(CLeftPanel)
public:
CLeftPanel(CWnd* pParent = NULL);
virtual ~CLeftPanel();
enum { IDD = IDD_FORMVIEW_LEFT };
protected:
virtual void DoDataExchange(CDataExchange* pDX);
DECLARE_MESSAGE_MAP()
public:
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
};
#include "stdafx.h"
#include "SplitForm.h"
#include "LeftPanel.h"
IMPLEMENT_DYNCREATE(CLeftPanel, CDialog)
CLeftPanel::CLeftPanel(CWnd* pParent )
: CDialog(CLeftPanel::IDD, pParent)
{
}
CLeftPanel::~CLeftPanel()
{
}
void CLeftPanel::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CLeftPanel, CDialog)
ON_WM_ERASEBKGND()
ON_WM_LBUTTONDBLCLK()
END_MESSAGE_MAP()
BOOL CLeftPanel::OnEraseBkgnd(CDC* pDC)
{
return CDialog::OnEraseBkgnd(pDC);
}
void CLeftPanel::OnLButtonDblClk(UINT nFlags, CPoint point)
{
CDialog::OnLButtonDblClk(nFlags, point);
this->MessageBox((LPCTSTR)_T("Test"), NULL);
}
Both the LeftPanel and RightPanel and blank. Why the controls on LeftPanel and Right Panel donot display?
|
|
|
|
|
You could try to use a CFormView derivation for your panes...
They sought it with thimbles, they sought it with care;
They pursued it with forks and hope;
They threatened its life with a railway-share;
They charmed it with smiles and soap.
|
|
|
|
|
yu-jian wrote: Why the controls on LeftPanel and Right Panel donot display?
What controls? I see nothing in CLeftPanel that indicates it has any controls.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
I had drawed two buttons to the Dialog IDD_FORMVIEW_LEFT
in the Form design tools.
|
|
|
|
|
yu-jian wrote: I had drawed two buttons to the Dialog IDD_FORMVIEW_LEFT...
But there are no control variables in CLeftPanel . There's also nothing shown in DoDataExchange() . Why?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Yes, I not band the variable to button control. I only draw this button to the FormView. So it does not show?
|
|
|
|
|
Hi all,
i m using a Tree Ctrl,i want to identify whether i clicked over hash button or item label.
please tell me how can i do this.
thanks in advance.
|
|
|
|
|
You'll probably want to do something like this when handling the NM_DBLCLK notification:
case NM_DBLCLK:
HTREEITEM hItem = (HTREEITEM)SendMessage(((LPNMHDR) lParam)->hwndFrom,TVM_GETNEXTITEM,TVGN_CARET,0);
TVITEM tvi;
tvi.mask = TVIF_PARAM;
tvi.hItem = hItem;
SendMessage(((LPNMHDR) lParam)->hwndFrom,TVM_GETITEM,0,(int)&tvi);
break;
tvi.lParam now contains the lParam value you added to the item when you added it to the tree view. You could use this value to give information on the content, e.g. if it is a hash button or item label.
modified 13-Sep-18 21:01pm.
|
|
|
|
|
i want to write a a program that will accept student name and grades and output it.use an array data structure in the implementation this program and implement the following
write method that will traverses the array and allow the user to perform the following processes
a) search for a particular student and his or her marks
b)find the average of all the student in the class
c)find all student with a mark below 50 and output them.
i started off with this codes in Java .But the thing is if i can do it in java i can do it in C and C++
import java.util.Scanner;
//import java.lang.String;
public class Main {
public static int n;
//public static String names;
//private static String[] nameS;
//private static String[] nameS;
/**
* @param args the command line arguments
*/
public static void main(String[] args/*,String[] nameS*/) {
Scanner in=new Scanner(System.in);
int Da=0;
int num []=new int[n];
//int x=0;
System.out.printf("%s\n","Enter the Number of student taking This Couse");
n=in.nextInt();
String name[]=new String [n];
System.out.printf("%s %s \n", "index","value");
for (; Da < name.length; Da++ )/*Da 4 Display array*/ {
System.out.printf( "%5d%8d\n", Da, name[Da] );
}
System.out.println("Enter the names of the student");
String names;
names=in.nextLine();
name[n] = new String(names);
for (; Da < name.length; Da++ ){
System.out.printf( "%5d%8d\n", Da, name[Da] );
}
}
}
i can not input the names into the array( name) i created
pls help me
|
|
|
|
|
Please don't cross post this in multiple forums. Make up your mind whether you want an answer to C/C++ or Java.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
and please use PRE tags for code snippets, I'm not going to read that unformatted unindented stuff!
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
modified on Saturday, December 4, 2010 12:01 AM
|
|
|
|